Reputation: 4400
i am new to linux. i have kubuntu 11.10 , i have installed ruby 1.9.2 and only after this i have installed rvm. after this i made
rvm install 1.9.2
and
rvm install 1.8.7
and when i use
rvm use 1.8.7
ruby -v
it writes
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
i tryed to use another versions but it writes same anyway, so i think that rvm dont have priority to choose ruby version. how to solve this problem? It's cause i have installed ruby and only after this i have installed rvm?
Upvotes: 1
Views: 1491
Reputation: 652
First you should establish if rvm is installed correctly, you can determine that by entering type rvm | head -1
in your terminal. If you get the response rvm is a function
then rvm is installed correctly.
If it's an installation problem carefully go back over each step, if you still can't figure out what's wrong I highly recommend visiting the #rvm channel on freenode (irc). The creator and other knowledgeable rvmers are almost always available, friendly and willing to help you troubleshoot. If you end up using ruby extensively, you're going to start needing more of the functionality rvm offers (gemsets, etc.) and #rvm can be a great resource when you get tripped up.
Upvotes: 0
Reputation: 33732
looking at the output of your rvm list
, you have two rubies installed, none of them default.
Looks like you just missed the step to make 1.9.2 the default.
And it seems you didn't modify your .bash_profile
file
See Step 3 on this page:
http://beginrescueend.com/rvm/install/
Your file ~/.bash_profile
should contain this line:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
(make sure to start a new shell, after modifying .bash_profile)
Then run this: (to set the default Ruby version)
rvm --default use 1.9.2
ruby -v
See also:
http://beginrescueend.com/rubies/default/
Upvotes: 2