Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change rails version used by rvm

Here are my local gems :

$ gem list  *** LOCAL GEMS ***  actionmailer (4.0.0, 3.2.14) actionpack (4.0.0, 3.2.14) activemodel (4.0.0, 3.2.14) activerecord (4.0.0, 3.2.14) activerecord-deprecated_finders (1.0.3) activeresource (3.2.14) activesupport (4.0.0, 3.2.14) arel (4.0.0, 3.0.2) atomic (1.1.13) builder (3.1.4, 3.0.4) bundler (1.3.5) bundler-unload (1.0.1) erubis (2.7.0) hike (1.2.3) i18n (0.6.5) journey (1.0.4) json (1.8.0) mail (2.5.4) mime-types (1.24) minitest (4.7.5) multi_json (1.7.9) polyglot (0.3.3) rack (1.5.2, 1.4.5) rack-cache (1.2) rack-ssl (1.3.3) rack-test (0.6.2) rails (3.2.14) railties (4.0.0, 3.2.14) rake (10.1.0) rdoc (3.12.2) rubygems-bundler (1.2.2) rubygems-update (2.0.7) rvm (1.11.3.8) sprockets (2.10.0, 2.2.2) sprockets-rails (2.0.0) thor (0.18.1) thread_safe (0.1.2) tilt (1.4.1) treetop (1.4.15) tzinfo (0.3.37) 

But when I type rails -v I get this :

 $ rails -v Rails 4.0.0  $ which rails /Users/polonium/.rvm/rubies/ruby-2.0.0-p247/bin/rails 

How can I specify rvm to use rails version 3.2.14 ?

Thanks in advance

like image 554
Pol0nium Avatar asked Aug 17 '13 14:08

Pol0nium


People also ask

How do I use a different version of Rails?

There's nothing you need to do to manage two different Rails versions. The only thing you'll want to do is gem install rails to get the latest version and create your new project with rails new myapp . That will make sure the new project starts with Rails 5.1 (or whatever is the latest at the time).

How do I change the Rails version in Linux?

goto your current ruby version 'bin' folder ( in my system c:/RubyXX-x64/bin) you will find "rails" file there. open that "rails" file with text editor you will see ----- version = ">= 0" (which means: it opens the highest version of rails, which exist in your ruby gems)


1 Answers

You can create a new rails app with a particular rails version, like this:

rails _3.2.14_ new myApp 
like image 135
Santhosh Avatar answered Oct 05 '22 16:10

Santhosh