Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set default rails version for a project?

I have installed two different rails versions in my system (Fedora).

gem list -d rails
*** LOCAL GEMS ***

rails (3.0.5, 1.2.1)
    Author: David Heinemeier Hansson
    Rubyforge: http://rubyforge.org/projects/rails
    Homepage: http://www.rubyonrails.org
    Installed at (3.0.5): /usr/local/lib/ruby/gems/1.8
                 (1.2.1): /usr/local/lib/ruby/gems/1.8

    Full-stack web application framework.

When i try to create the project like following way ("http://www.nomachetejuggling.com/2008/03/12/using-multiple-versions-of-rails/")

rails 1.2.1 myproject

But, it's not working. So, i checked

rails -v
Rails 3.0.5

So, can you help me, how to create the project with older version and newer version. Is there any way to set the particular rails version as default?

like image 360
Mr. Black Avatar asked May 27 '11 05:05

Mr. Black


People also ask

How do I use different versions of rails?

Normally you should be able to choose different gemsets and have there a specific ruby version. In the past I created always a clean an fresh new gemset for a new project..so first create a gemset, second choose the new gemset, third install the newest rails, fourth use it :-). Should work..


1 Answers

To use an older version than the latest you have installed, just wrap the version number in underscores:

rails _1.2.1_ myproject

like image 59
matkins Avatar answered Sep 24 '22 02:09

matkins