views:

119

answers:

2

I've got Snow Leopard with Rails 2.3.5 installed along with other versions (2.2.2 and 1.2.6). I'd like to use 2.2.2 as the webserver I want to deploy to uses a 2.2.x version of Rails. I've tried to uninstall Rails 2.3.5 but get this error:

ERROR:  While executing gem ... (Gem::InstallError)
    cannot uninstall, check `gem list -d rails`

Is there any other way of setting the Rails version to one of the other installed Rails versions?

+2  A: 

Hi,

You should really take look to RVM(Ruby Version Manager) it's awesome!

http://rvm.beginrescueend.com/

http://teachmetocode.com/screencasts/rvm-ruby-version-manager/

Cheers

Denis

denisjacquemin
+1 IMHO RVM will save you a LOT of pain and tears, and it's a piece of cake to setup and start using.
Petros
RVM is for managing Ruby, not Rails. How does this help?
Beerlington
managing rails with gemsets http://rvm.beginrescueend.com/gemsets/basics/
denisjacquemin
Interesting, but seems like overkill. If your application specifies the rails version, it will automatically use that gem.
Beerlington
no, check this how-to http://www.stjhimy.com/posts/4
denisjacquemin
From the article: "If you have already Rails 2.3.5 and you install the new 2.3.8 you will lost the previous version" - That's not true. You can have multiple versions of Rails (or any gem) installed at the same time and you can use any of them since your application specifies the gems needed, not RVM.
Beerlington
A: 

You should be able to do this without needing to uninstall anything. You can specify the version of rails you want to create an application for by typing the following when creating a new app.

rails _2.2.2_ app_name
Beerlington