Updating RubyGems and Rails in Leopard

If you just installed Leopard and the developer tools, you’ll find out that Ruby on Rails is there, ready to be used. But of course, it’s Rails 1.2.3, which is fine, but it turns out that last Friday Rails went 2.0. Not only that, but RubyGems was updated to 0.9.5 lately too… and you’re dying to have everything up and running on your system.

So how to proceed? Follow these instructions:

  1. Open Terminal.app
  2. $ sudo gem update --system
  3. $ sudo gem install rails
  4. $ sudo gem update

If you just do “gem update”, then the current Rails installation will be broken. You must do ‘gem install rails” (which seems odd, because it was already installed, after all). The thing is that since you’ve updated RubyGems with the command 2) above, then you need to re-install Rails. I haven’t tried with other gems, but it could be the same situation for them.

Update, 2007-12-19: Here’s another solution for this problem!