Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I install Ruby on Rails 2.x and Ruby on Rails 3 side by side

I have a Ubuntu rails enviroment for playing around with ROR. Right now I am running Rails 2.3.8.

I want to look into rails 3. Is it possible to run both dev enviroments side-by-side? If not, how do I clean up my rails 2.x system to install rails 3? Or do I need to setup a whole new Ubuntu machine?

Any help, links... pointers would be great!

like image 595
server info Avatar asked Aug 13 '10 09:08

server info


1 Answers

I would highly recommend Ruby Version Manager (rvm) - see this railscast for more information. This allows you to easily manage different versions of Ruby on the same machine. I believe this should also enable you to keep the different versions of Rails separate from each other, and allow you to switch between them easily - see this example from http://rvm.beginrescueend.com/gemsets/basics/ :

rvm 1.9.2-head
gem install rails -v 2.3.3

rvm gemset create rails222 rails126
Gemset 'rails222' created.
Gemset 'rails126' created.

rvm 1.9.2-head@rails222
gem install rails -v 2.2.2

rvm 1.9.2-head@rails126
gem install rails -v 1.2.6

Hope that helps!

like image 173
Budgie Avatar answered Sep 22 '22 05:09

Budgie