It was a struggle, but we got there in the end. The background to this was that I tried to upgrade my Rails install from 2.3.3 to 2.3.5 using the Rails wiki Getting Started guide, and then started running into problems. Ooh look, here it is:

Library/Ruby/Site/1.8/rubygems.rb:777:in `report_activate_error': RubyGem version error: rack(1.0.0 not ~> 1.0.1) (Gem::LoadError)

…which meant I had the wrong version of Rack installed. To be fair, that’s bleedin’ obvious from the error message. How often do you get an error message that clear? For Rails 2.3.5, Rack 1.01 is the right one, so uninstall Rack, all versions:

[e@lemons ~/ruby/project]$ sudo gem uninstall rack

Select gem to uninstall:
 1. rack-1.1.0
 2. rack-1.0.0
 3. All versions
> 3
Remove executables:
    rackup

in addition to the gem? [Yn]  Y
Removing rackup
Successfully uninstalled rack-1.1.0

…and then installed Rack v1.01:

[e@lemons ~/ruby/project]$ sudo gem install rack -v 1.0.1
Successfully installed rack-1.0.1
1 gem installed
Installing ri documentation for rack-1.0.1...
Installing RDoc documentation for rack-1.0.1...

which all helped. But then I tried to to do rake db:create using MySQL and got no joy. So I ended up…

  1. Installing XCode from the Snow Leopard DVD. Yes, even if you installed it under Leopard.
  2. Download the latest 64-bit MySQL DMG from the MySQL download area – yes, that’s 64-bit
  3. In Terminal… sudo gem update --system
  4. And then… sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

And with this I could create my MySQL database using rake, and start it up as usual. All done by 11.30pm on a school night, ow.