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…