views:

29

answers:

2

I have several very good books like "The Rails Way", "Learning Rails", etc., those which are written for Rails 2.1 or Rails 2.2 But the latest version I am using in my machine for my projects is 2.3.8

I dont want to miss the content in that book. I want to keep multiple versions of rails in my machine and choose the version when I create a new project. I have tried doing such things but I end up getting crazy errors.

Have anybody solved this problem ?

Please help.

Thanks

+1  A: 

Vendorize the rails. Basically you put rails in $project/vendor/rails instead of managed in gem.

You can download the rails gem and put it in vendor/rails. Or you can pull it from github using git that way you can update it easily.

jpartogi
so .. should I download a specific rails version from the net and put it in vendor/ everytime I create a new rails project (of versions other than that is installed in the system) ??
lakshmanan
You can use the command rake rails:freeze:gems to copy the currently active version of rails into vendor/rails
nuclearsandwich
+2  A: 

If you are in using a UNIX-like environment check out the Ruby Version Manager scripts.

In a nutshell, they allow you to load concurrent ruby environments on the fly. So you can work with 1.9.2 and the Rails 3.0 beta and maintain your existing Rails apps with 1.8.7. It even has support for other Ruby interpreters such as JRuby, Rubinius, IronRuby and MacRuby. Each environment has it's own gem set and you can specify a system default as well as switch individual terminal windows to different versions. But that hurts my brain.

nuclearsandwich