views:

34

answers:

2

Hello.

I have Mac OS X Snow leopard that has pre-installed Ruby 1.8.7 and Rails 3.0.1 I need to work with Redmine a bit that requires Rails 2.3.5

Is it possible to correctly downgrade my current rails 3.0.1 to rails 2.3.5?

+3  A: 

You don't need to downgrade, RubyGems allow you to install multiple versions of the same library.

$ gem install rails -v 2.3.5
Simone Carletti
Thanks! (15 characters)
Eye of Hell
Is it any way to set a 'current version', so my rails commands refer to 2.3.5, not 3.0.1? (for example, rails -v shows 3.0.1 after installing 2.3.5)
Eye of Hell
No, you need to remove 3.0.1 or use `rails _2.3.5_ COMMAND` instead of `rails COMMAND`
Simone Carletti
Sorry for being nub in gems - how to correctly remove 3.0.1 ?
Eye of Hell
`$ gem uninstall rails`, then select the version.
Simone Carletti
+3  A: 

To avoid versioning hell, you can also use rvm, which allows you to install multiple ruby versions and "gemsets" on the same machine and switch between them.

averell