morcutt
morcutt

Reputation: 3749

How can I downgrade from ruby 1.9.1 to ruby 1.8.7

I just upgraded to rails 3 but was running ruby 1.9.1 prior to the upgrade. Rails 3 doesn't support Ruby 1.9.1. How can I downgrade to ruby 1.8.7?

Upvotes: 6

Views: 37130

Answers (3)

ennuikiller
ennuikiller

Reputation: 46965

install rvm, this will allow you to run multiple versions of ruby and switch between them at will: rvm

Upvotes: 9

Charaf JRA
Charaf JRA

Reputation: 8334

This will downgrade from your current version to 1.8.7:

gem update --system 1.8.7

Upvotes: 20

Swanand
Swanand

Reputation: 12426

As others have mentioned, its hard to come up with exact solution, in general to downgrade or switch versions for a user:

  1. Install Ruby 1.8.7 (or locate it on your system if you have it already)
  2. Edit your .bash_profile or .bashrc file to update your $PATH so that the 1.8.7 executable is found first. Something like this:

    export RUBY_187_HOME='/path/to/1.8.7'
    export PATH=$RUBY_187_HOME/bin:$PATH
    
  3. This is a little similar to what RVM does and it works.

  4. To test, try

    $ which ruby 
    $ /path/to/1.8.7/bin/ruby
    

Upvotes: 0

Related Questions