views:

817

answers:

2

I need to install Rails 2.3.2 and Rails 2.3.4 simultaneously on my Ubuntu 9.04 server. How do I do this?

When I run:

sudo gem install rails

...it installs version 2.3.4. Is there a single command I can use to also install 2.3.2 parallel to the default (latest) version?

Thanks!

+6  A: 

use the -v option to gem:

sudo gem install rails -v=2.3.2

you'll have to do a separate install for 2.3.4 though

ennuikiller
Thx! I guess I could have looked that up.... It actually installs the older versions for all the associated gems as well. Awesome!
caseyamcl
It installs the correct version of those gems because they are treated as hard dependencies required by the particular version of Rails.
EmFi
You might want to consider freezing your gems to /vendor/rails too.
jonnii
A: 

once installed you can specify which version you want to use for a specific rail app by editing the environment.rb file

config/environment.rb

# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION
Jason