问题
Eventhough I have Ruby 1.9.3 installed via RVM, every time I open a new Terminal and run "ruby -v" I get:
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin11.0]
"rvm list" shows:
rvm rubies
ruby-1.9.3-p362 [ x86_64 ]
=* ruby-1.9.3-p374 [ x86_64 ]
# => - current
# =* - current && default
# * - default
I've tried entering "rvm use 1.9.3 --default" but it only works for the current terminal session. Opening new terminals always reverts back to 1.8.7.
I've also made sure that my ~/.bash_profile contains at the end:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
What can I do so that I don't have to type "rvm use 1.9.3" every time I open a terminal?
回答1:
Make sure that your .rvm
directory is in your PATH
来源:https://stackoverflow.com/questions/14530503/installed-ruby-1-9-3-but-ruby-v-keeps-showing-1-8-7-every-new-terminal