5

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?

Matt
  • 5,573
  • 4
  • 33
  • 37

2 Answers2

3

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

Cheers

Denis

mpapis
  • 52,729
  • 14
  • 121
  • 158
denisjacquemin
  • 7,414
  • 10
  • 55
  • 72
  • +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 Sep 25 '10 at 11:48
  • 1
    Interesting, but seems like overkill. If your application specifies the rails version, it will automatically use that gem. – Peter Brown Sep 25 '10 at 14:52
  • 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. – Peter Brown Sep 25 '10 at 15:14
3

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
Peter Brown
  • 50,956
  • 18
  • 113
  • 146