Reputation: 557
I have 2 version of Ruby on the system, but like to use version 1.8.6. Could someone show me how to do this?
ruby 1.8.6 (2009-08-04 patchlevel 383) [x86_64-linux]
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
/usr/local/rvm/rubies/ruby-2.1.2/bin/ruby
Thanks,
PL
I found solution at https://superuser.com/questions/137130/how-to-configure-installed-ruby-and-gems by adding 2 lines in ~/.gemrc file. Thanks for all replies.
Upvotes: 0
Views: 559
Reputation: 3949
You can switch your version of ruby using rvm, assuming you installed that version with rvm, like this:
rvm use 1.8.6 --default
Or if you had ruby pre-installed and want to use that version than use this:
rvm use system --default
Of course, remove the --default if you don't want it to be the default.
Seeing that you didn't install 1.8.6 with rvm, I would reinstall it with rvm, so you are using rvm consistently across all your ruby versions.
Upvotes: 0
Reputation: 1789
Set it in a .ruby-version
file in your project directory. Something like:
1.8.6-p383
Upvotes: 0
Reputation: 17710
You're not on the right forum, but the answer lies in the order of directories in your $PATH
. Check your .profile
and/or /etc/profile
.
Upvotes: -1