views:

659

answers:

2

I'm new to Rails development, and I'm trying to figure out how to use an older version of Rails with Apatana's RadRails IDE. I'm trying to help out a friend who has a site built on older version than the one that automatically gets downloaded by RadRails, and I'm pretty sure the two versions wouldn't be compatible (the site is using some pre 2.0 version, not sure of the exact number offhand).

Is there a way to tell RadRails to get and use a specific version of Rails? Or is there something I can do at the command line to change the installed version of Rails? I'm only vaguely familiar with the "gem" package system, but I'm assuming it would involve that.

Any help would be much appreciated!

+2  A: 

Use the Rake task rails:freeze:gems in your rails project and give it the version you want to use. For example:

rake rails:freeze:gems VERSION=2.1.0

That will put the right version of Rails into vendor/rails, which is loaded by default if it exists.

Otto
+1  A: 

If you don't want to freeze the gem into your project (using rake rails:freeze:gems), you can install the rails gem of the version you want to use:

gem install rails -v 2.0.2

and then specify the rails gem to use in your config/environment.rb:

RAILS_GEM_VERSION = '2.0.2'