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?
+3
A:
install rvm, this will allow you to run multiple versions of ruby and switch between them at will: rvm
ennuikiller
2010-08-17 01:45:54
I second the suggestion to use rvm when installing multiple versions of Ruby, but rvm doesn't really answer the question the OP asked.
Greg
2010-08-17 02:23:52
A:
As others have mentioned, its hard to come up with exact solution, in general to downgrade or switch versions for a user:
- Install Ruby 1.8.7 (or locate it on your system if you have it already)
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
This is a little similar to what RVM does and it works.
To test, try
$ which ruby $ /path/to/1.8.7/bin/ruby
Swanand
2010-08-17 13:33:19