views:

41

answers:

3

I just finished a project with rails 2.3.8. Client won't pay for the migration, so I want to keep it as is.

I want to start a new project, which is to build my own homepage. Want to use similar tools but want to go to rails 3.0.

Can these versions co-exist on the same machine? If yes, what do I need to do? Found few pages online, but not sure they are up-to-date (e.g. about rails 3 beta and rvm).

+6  A: 

I'm using rvm and running 2.3.9 on ruby 1.8.7 and 3.0.1 on ruby 1.9.2 and it works quite well. I followed http://rvm.beginrescueend.com/rvm/install/ to get rvm installed and then switched to it with:

rvm use 1.9.2

Then you can install Rails 3 on that rvm, set up your new project and switch back to your system ruby and older rails when you need to with:

rvm use system

It's been a really great way of switching back/forth for me.

njorden
Oh, also...I'm on OS X, I needed to use this command to install: rvm install 1.9.2 -C --enable-shared,--with-readline-dir=/usr/local
njorden
A: 

Make R3 the default for your system. Then freeze rake rails:freeze:edge RELEASE=2.3.8 applications if you need to develop with old versions

Sam
A: 

With rvm you can also use different gemsets with the same ruby installation: http://rvm.beginrescueend.com/gemsets/basics/

Macario