Mysql gem causing migrations to fail :P

I have run into a weird problem recently after I upgraded my ruby
installation from 1.8.5 to 1.8.6. Every time I run a migration on my
production machine, the migration fails with a segmentation fault:

$ rake db:migrate RAILS_ENV=production
(in /home/site.com/web/rails/releases/20071231141335)
/opt/csw/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/active_record/
connection_adapters/mysql_adapter.rb:333: [BUG] Segmentation fault
ruby 1.8.6 (2007-09-24) [i386-solaris2.11]
Abort (core dumped)

If I remove the MySQL gem, the migration works. I have tried removing
and reinstalling MySQL, Rails, and Rake, all without any success.

Regarding the actual error, it’s occurring when the migration executes
SHOW KEYS FROM #{table_name}. The MySQL query log shows that many of
these commands are being executed successfully, and then after a
certain number of SQL commands the ruby / rake process segfaults.

Any ideas? I’m pretty stuck and would appreciate any suggestions…

On 2 Jan 2008, at 13:33, Collin VanDyck wrote:

Abort (core dumped)

If I remove the MySQL gem, the migration works. I have tried removing
and reinstalling MySQL, Rails, and Rake, all without any success.

Regarding the actual error, it’s occurring when the migration executes
SHOW KEYS FROM #{table_name}. The MySQL query log shows that many of
these commands are being executed successfully, and then after a
certain number of SQL commands the ruby / rake process segfaults.

Any ideas? I’m pretty stuck and would appreciate any suggestions…
Have you tried recompiling the mysql gem against the new version of
ruby ?

Fred

Have you tried recompiling the mysql gem against the new version of
ruby ?

Fred

I did:

$ sudo gem uninstall mysql
$ sudo gem install mysql

Both of which completed successfully.

If the migrations and possibly everything else works without the gem,
just
leave it uninstalled.

Ryan B.

Feel free to add me to MSN and/or GTalk as this email.