Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I switch between rails 3.2.13 and rails 4.0.0?

I am using ubuntu 12.04. I have installed ruby 1.9.3 and rails 3.2.13. When I check my version of rails using command rails -v, it shows Rails 4.0. How can I switch to Rails 3.2.13?

like image 330
Ashwini K Avatar asked Jul 05 '13 07:07

Ashwini K


2 Answers

As you have already installed rails and its current version is 4.0, so please do this gem install rails -v 3.2.13 and if you want to remove 4.0 version please do gem uninstall rails, you will get the list of rails and then choose 4.0.0 version.

Simple If you want to switch rails then you can install multiple rails version by using sudo gem install rails -v 3.2.x or gem install rails or any version you want

If you want to switch ruby version use rvm and choose rvm use 1.9.3 or rvm use 2.0.0

Thanks

like image 58
Rajarshi Das Avatar answered Nov 19 '22 07:11

Rajarshi Das


rails new appname will use the latest version of rails. To use an earlier installed version, call:

rails _3.2.13_ new appname

You can then have both versions of rails installed and not have to deal with uninstalling rails which can be problematic.

like image 27
timpone Avatar answered Nov 19 '22 09:11

timpone