title: How to switch to an older version of rails
body: <p>I'm trying to follow an older book written in 2011. </p>
  
  <p>So, randomly picked <a href="http://rubygems.org/gems/rails/versions/3.1.3">3.1.3</a> version since that's Nov 2011. </p>
  
  <p>How do I switch to that version in my RVM? </p>
  
  <p>Currently have <code>Rails 4.0.0.beta1</code> version ... </p>
  
  <p>Please don't suggest to put it in the Gemfile because there are a lot of other dependencies that will just be too troublesome to deal with, hence if I just switch, I'm assuming it means that other dependencies will be taken care of at the same time too, right? </p>
  
  <p><strong>UPDATE</strong> </p>
  
  <pre><code>**-s-MacBook-Pro:agile **$ rails -v
  Rails 4.0.0.beta1
  **-s-MacBook-Pro:agile **$ gem install rails -v 3.1.3
  Successfully installed rails-3.1.3
  1 gem installed
  **-s-MacBook-Pro:agile **$ rvm gemset create rails 313
  gemset created rails    =&gt; /Users/**/.rvm/gems/ruby-1.9.3-p392@rails
  gemset created 313  =&gt; /Users/**/.rvm/gems/ruby-1.9.3-p392@313
  **-s-MacBook-Pro:agile **$ ruby -v
  ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin10.8.0]
  **-s-MacBook-Pro:agile **$ rvm 1.9.3p392-head@rails313
  Unknown ruby interpreter version: '1.9.3p392'.
  **-s-MacBook-Pro:agile **$ 
  </code></pre>
  
  <p><strong>UPDATE AGAIN</strong> </p>
  
  <pre><code>**-s-MacBook-Pro:agile **$ rvm gemset use 313
  Using ruby-1.9.3-p392 with gemset 313
  **-s-MacBook-Pro:agile **$ rails -v
  /Library/Ruby/Site/1.8/rubygems/dependency.rb:296:in `to_specs': Could not find 'rails'     (&gt;= 0) among 2 total gem(s) (Gem::LoadError)
  from /Library/Ruby/Site/1.8/rubygems/dependency.rb:307:in `to_spec'
  from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_gem.rb:47:in `gem'
  from /usr/bin/rails:18
  **-s-MacBook-Pro:agile **$ 
  </code></pre>