rvm: command not found MAC OX

耗尽温柔 提交于 2019-11-28 15:37:51

It might because the terminal not having rvm shell configuration loaded.

Try following from your terminal:

$ source ~/.rvm/scripts/rvm

then

$ type rvm | head -n 1

If the output is:

rvm is a function

You may need to add "source ~/.rvm/scripts/rvm" to your ~/.bash_profile file

you need to read all the texts that are displayed when you install RVM:

rm -rf ~/.rvm
curl -L https://get.rvm.io | bash -s stable
parkerqian

after you run sudo curl -L https://get.rvm.io | bash -s stable --ruby

you need to close the terminal ,then open again!

DonRichards

This worked for me:

rm -rf ~/.rvm
curl -L https://get.rvm.io | bash -s stable

source /etc/profile worked for me.

Close and restart terminal after installing RVM — gets me EVERY TIME.

For a long-term solution, you should add this to your ~/.profile file:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

to simply load rvm into a single terminal, use

source "$HOME/.rvm/scripts/rvm"

supposedly this call is more cross-platform:

. "$HOME/.rvm/scripts/rvm"

To start using RVM, you'll need to enter source /Users/yourusername/.rvm/scripts/rvm into your terminal (of course, insert your real username in place of yourusername).

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