Posted by Vince Wadhwani on Jan 14, 2008

Following up a bit on a post I wrote a few days ago on some tips to upgrading your rails app for Rails 2. What happens if it just won't work? Then, later on you do a fresh install of rails and get the latest/greatest version while your app still depends on an older version? Well, if you didn't freeze rails with your app you still have a way out: install an older version of rails with rubygems. The command is easy:

sudo gem install rails --version 1.2.6

Lastly, you'll want to make sure your config/environment.rb has a line in it to match your older version of rails:

RAILS_GEM_VERSION = '1.2.6'