RVM is loading with the wrong version of ruby?

北慕城南 提交于 2019-12-06 16:45:46

When you run ruby -v in command prompt, you are actually running /usr/bin/ruby because you set /usr/bin in very first of $PATH env variable. You should move the following rvm initialize command to the end of bash profile.

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function

it should work. You don't need to run rvm use command in your bash profile once you set default ruby by --default flag.

You should probably delete these lines from your bashrc:

# Sets the RVM profile on terminal load
rvm use ruby-1.9.3-p125
rvm use 1.9.3 --default

rvm should automatically load it's default profile when you open your terminal, so no need to set (and re-set for some reason) the version in your bashrc.

The --default option is only needed once, to indicate the selected version to be the default from then on.

Try rvm alias create default 1.9.3.

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