Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use multiple versions of rails in the same machine

I have installed rails 3.0.10 and 2.3.5 in my machine. I wanna shuffle between them but I am unable to use 2.3.5. When I run a command, the system recognizes only 3.0.10.

like image 702
Rahul Avatar asked Nov 24 '25 09:11

Rahul


1 Answers

rvm lets you easily manage multiple installs of Ruby, each with their own list of gemsets.

Edit: Based on your comment about looking into gemsets, I'll point out one of the single coolest features with rvm. Once you get your gemset setup, create a .rvmrc file in your Rails root directory. Add the following to it:

rvm 1.9.2@foo

Where "1.9.2" is whatever Ruby you're using and "foo" is the gemset name. rvm will automatically start using this set when you cd in to that directory.

like image 136
jdl Avatar answered Nov 27 '25 17:11

jdl



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!