1

I know this shouldn't be too hard, but I literally cannot figure it out and haven't found anything. I am currently using rails 4.0.4 but want to go back to 3.whatever. I have uninstalled and reinstalled and tried rvm but have not been able to get back to what I want. Thanks and appreciate all help!

  • Did you add a .ruby-version or .ruby-gemset file? – MCB Apr 06 '14 at 20:57
  • If you install Rails in a gemset, following this guide [Installing Rails](http://railsapps.github.io/installing-rails.html), you should have no difficulty switching between versions of Rails by switching gemsets. – Daniel Kehoe Apr 06 '14 at 21:20

2 Answers2

0

After all, Rails is a ruby gem , you can specify any version you want using Gemfile , for example:

gem 'rails' , '3.0.0'

And simply run

bundle install

If you are not using Bundler , you could also do:

gem uninstall rails

gem install rails --version 3.0.0

Community
  • 1
  • 1
Nimir
  • 5,727
  • 1
  • 26
  • 34
  • 1
    if you take that road you need to get sure if all other dependencies are compatible with that rails version, especially the ones with a specific version in the Gemfile – Alexis Apr 06 '14 at 23:45
  • Also, `gem uninstall railties` and remove the binary command too when prompted. – scarver2 Apr 07 '14 at 06:20
0

you can run

gem list rails
*** LOCAL GEMS ***
rails (4.1.0.beta1, 4.0.2, 4.0.0, 3.2.15, 3.2.13, 3.2.11, 3.2.8, 3.2.6, 3.0.7)

to see witch rails gem you currently have installed, then use for example

rails _3.2.15_ new test_app

to generate a rails 3.2.15 application

if you don't have the version you want already installed, you can do

gem install rails --version 3.2.12
Alexis
  • 4,836
  • 2
  • 21
  • 27