Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you change Rails version on a mac?

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?

like image 355
Matt Avatar asked Sep 25 '10 10:09

Matt


2 Answers

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

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

Cheers

Denis

like image 188
denisjacquemin Avatar answered Oct 16 '22 14:10

denisjacquemin


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
like image 23
Peter Brown Avatar answered Oct 16 '22 14:10

Peter Brown