Rails 2.3.5 and 3.0 side by side

Hi All,

Yesterday I have spent whole day installing Rails 3.0 in a virtual
machine and then installing them side by side on a development
machine, which runs Linux Mint 8.

I already had Ruby 1.8.7 and Ruby 1.9.1p243 installed from packages
and Rails 2.3.5 installed from gems.

To install Rails 3.0 I have used gem1.9.1, so I have environment
almost totally depending on Ruby1.9.1. The problem was having to use
Ruby1.9.1 commands as follows:

sudo gem1.9.1 install tzinfo builder memcache-client rack rack-test
rack-mount erubis mail text-format thor bundler i18n sqlite3-ruby
sudo gem1.9.1 install rack-mount—version=0.4.0
sudo gem1.9.1 install rails --pre
I also have installed using gem1.9.1 usual database gems that I will
need

Now I had gem binaries in two directories:
/var/lib/gems/1.8/bin/ and
/var/lib/gems/1.9.1/bin/

The 1.8 version was already in the $PATH so I could generate
applications as usual but to use Rails Beta I had to do following:

/var/lib/gems/1.9.1/bin/rails Beta -d mysql
same with commands like rake etc.

My solution was to create /home/user/bin directory, add it to the
$PATH, and put there symbolic links to gems1.9.1 bin directory naming
them like rails3, rake3 etc.

So far it seems to work I can get welcome pages from both versions
displaying correct Ruby version, and other environment data.

I am wondering if there’s a better way to set-up described above.

Best Regards,
Jack

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs