Displaying 7 results from an estimated 7 matches for "mysqlerror".
Did you mean:
mysql_error
2006 May 18
1
ActiveRecord problems from within template
...:group => ''credit_types.personnel_type'',
:conditions => ''credit_types.personnel_type="live_action_personnel"''
If I try and test this for emptiness:
if @film.live_action_personnel.size > 0
I get the following error:
MysqlError: Unknown table ''credit_types'' in where clause: SELECT count(*) AS count_all FROM credits WHERE (credits.film_id = 16 AND (credit_types.personnel_type="live_action_personnel"))
but if I debug(@film.live_action_personnel) earlier within the same template, all is well!
It...
2006 Apr 30
3
MySQL connection problems on Dreamhost
To all fellow Dreamhosters out there...
Sometimes my app mysteriously loses its connection to the database,
resulting in a big ugly "Application Error (Rails)" page. Usually
refreshing the page makes it go away, but not today. :-(
In production.log I see this:
MysqlError (Lost connection to MySQL server during query):
Any idea why this happens? It''s rather intermittent and random, but I
get this a few times a week.
I''ve pasted a large section of the call stack below in case it helps.
Thanks!
Jeff
/usr/lib/ruby/gems/1.8/gems/activerecord-...
2006 Mar 30
2
database.yml and Dreamhost
I am unable to connect to my databases.
Here is the error I am getting:
MysqlError (Can''t connect to local MySQL server through socket
''/var/run/mysqld/mysqld.sock'' (2)):
Here is my database.yml:
# MySQL (default setup). Versions 4.1 and 5.0 are recommended.
#
# Get the fast C bindings:
# gem install mysql
# (on OS X: gem install mysql -- --inc...
2006 Aug 14
0
MediumText with Rails Migrations
...ow to reliably define a column as mediumtext
type through a migration.
First I tried this:
change_column( :entries, :lines, :text, :limit => 2.megabytes )
It worked fine for my development box on MySQL 5.0, but when I tried
it on my production box with MySQL 4.0, it gave the following error:
MysqlError: You have an error in your SQL syntax. Check the manual
that corresponds to your MySQL server version for the right syntax to
use near ''(2097152)'' at line 1: ALTER TABLE entries CHANGE lines lines
text(2097152)
I finally settled on doing this in the migration:
execute "ALT...
2006 Mar 25
0
[Sentry]-before_validation(model) not working for crypted-attribute?
I am still trying to get sentry working to encrypt a couple of
attributes in the model. One of them is a password field and the other
ssn#.
I have crypted_password and crypted_ssn in the db.
In addition, I also have validates_uniqueness_of :ssn
Here is the problem... I get the error
MysqlError: Unknown column ''ssn'' in ''where clause'': SELECT * FROM
students WHERE (ssn = ''123-45-6789'') LIMIT 1
THe stack trace shows that...
.../active_record/connection_adapters/abstract_adapter.rb:88:in `log''
.../active_record/connection_adapt...
2006 May 31
3
Database can''t connect -
...connecting properly. This is the
result i got:
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/mysql_adapter.rb:331:in
`real_connect'': Can''t connect to local MySQL server through socket
''/var/run/mysqld/mysqld.sock'' (2) (MysqlError)
from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/mysql_adapter.rb:331:in
`connect''
from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/mysql_adapter.rb:88:in
`initialize''...
2006 Jan 04
4
many to many link table compound primary key explosion
...nship between two tables, questions and
answers. My MySQL schema for the link table creates a primary key from
the two fields to prevent duplicate records. When I add the same answer
to the same question more than once, rails attempts to create a
duplicate record and explodes with a MySQL error:
MysqlError: Duplicate entry ''3-3'' for key 1: INSERT INTO
answers_questions (`question_id`, `answer_id`) VALUES (3, 3)
Now, I realise I can fix this by removing the primary key from my
schema, and some would say the primary key is unnecessary, but I think
Rails'' behaviour is wrong....