views:

393

answers:

1

Hi all, I just upgraded my Leopard system to Snow. I had a Rails application with a suite of Spec examples running before the upgrade; it used a mysql database.

After the upgrade, running rake spec would fail like this:

...
** Invoke db:schema:load (first_time)
** Invoke environment 
** Execute db:schema:load
rake aborted!
closed stream
/opt/local/lib/ruby/1.8/mysql.rb:1032:in `sync='
/opt/local/lib/ruby/1.8/mysql.rb:1032:in `write'
/opt/local/lib/ruby/1.8/mysql.rb:1092:in `finalizer
...

I already tried the following:

  • reinstalling Mysql 5.1.37 x86;
  • uninstalling the old mysql gem;
  • running rake:db:migrate, rake:db:prepare and so on before running rake:spec without success;
  • gem update --system.

The strangest thing is that the specs are running ok when called one by one through the command line, or directly from TextMate.

Any suggestion?

If you need further info, please, just ask :)

A: 

You might want to try to recompile your mysql gem. For me it was very easy to do this with Ruby 1.8.7, but I can not get it to work for 1.9.1. Anyway here are some links that may help.

  1. http://void-design.net/2009/08/05/ruby-191-mysql-and-a-snow-leopard/
  2. http://www.schmidp.com/2009/06/14/rubyrails-and-mysql-on-snow-leopard-10a380/
  3. http://stackoverflow.com/questions/991708/rails-mysql-and-snow-leopard
Sean McCleary