命令未找到 MAC OX

真的,我不知道发生了什么。对不起,如果这个问题是如此 NOOB,但我不能找到这个问题的解决方案。

- bash: rvm: 未找到命令

我试过了

Curl-L https://get.rvm.io | bash-s ——最新版本

但仍然没有什么,我需要看到的红宝石版本使用的 simplecov,因为它不工作的旧版本从1.9

110787 次浏览

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

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

This worked for me:

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

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

you need to close the terminal ,then open again!

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).

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

source /etc/profile worked for me.

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"

As suggested by @mpapis, Do this first

$ rm -rf ~/.rvm

$ curl -L https://get.rvm.io | bash -s stable

Then, as suggested by @peterpengnz, do this and you should be fine with RVM cmd issues

$ source ~/.rvm/scripts/rvm