I have following ruby versions (I’m on linux (Ubuntu))
rvm list
ruby-1.8.7-p302 [ i386 ]
ruby-1.9.1-p378 [ i386 ]
=> ruby-1.9.2-p0 [ i386 ]
When I do:
sudo rvm --default use 1.8.7
My RVM Ruby version changed to:
=> ruby-1.8.7-p302 [ i386 ]
ruby-1.9.1-p378 [ i386 ]
ruby-1.9.2-p0 [ i386 ]
But it doesnt change my system gem version:
ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]
How to change my system ruby version to 1.8.7?
Using:
changes it for root, not for you. Remember, RVM is primarily for creating a sandbox for you as a user, not for the system or another user. Since you’ve been using
sudo, which is a bad thing, you probably have things that are now owned by root, not you, which will cause your Ruby system to behave like it’s psycho. Usechownto switch the ownership of all files in~/.rvmback to you.Use:
to switch back to the default Ruby in
/usr,/usr/localor/opt. Which one is called at that point will be determined by your PATH settings.To switch between versions in your account that display when you do
rvm list, use:or simply
If you want to make that the default version that is sticky, add on
--defaultto the end of the command.