Installed Ruby 1.9.3 but ruby -v keeps showing 1.8.7 every new terminal

五迷三道 提交于 2020-01-05 08:37:11

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!