macos rvm:找不到命令 MAC OX
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11677771/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
rvm: command not found MAC OX
提问by Asantoya17
Really, I don't know what happened. Excuse me if this question is so NOOB, but I can't find the solution for this problem.
真的,我不知道发生了什么。对不起,如果这个问题太菜了,但我找不到这个问题的解决方案。
-bash: rvm: command not found
-bash: rvm: 命令未找到
I tried this
我试过这个
curl -L https://get.rvm.io| bash -s -- --version latest
curl -L https://get.rvm.io| bash -s -- --version 最新
but still nothing I need to see the ruby version for use the simplecov because it not works with older version from 1.9
但我仍然不需要看到使用 simplecov 的 ruby 版本,因为它不适用于 1.9 的旧版本
回答by peterpengnz
It might because the terminal not having rvm shell configuration loaded.
这可能是因为终端没有加载 rvm shell 配置。
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
您可能需要将“source ~/.rvm/scripts/rvm”添加到您的 ~/.bash_profile 文件中
回答by mpapis
you need to read all the texts that are displayed when you install RVM:
您需要阅读安装 RVM 时显示的所有文本:
rm -rf ~/.rvm
curl -L https://get.rvm.io | bash -s stable
回答by parkerqian
after you run sudo curl -L https://get.rvm.io | bash -s stable --ruby
跑完之后 sudo curl -L https://get.rvm.io | bash -s stable --ruby
you need to close the terminal ,then open again!
您需要关闭终端,然后再次打开!
回答by DonRichards
This worked for me:
这对我有用:
rm -rf ~/.rvm
curl -L https://get.rvm.io | bash -s stable
回答by Wilson Silva
source /etc/profile
worked for me.
source /etc/profile
对我来说有效。
回答by Alexander Mills
For a long-term solution, you should add this to your ~/.profile
file:
对于长期解决方案,您应该将其添加到您的~/.profile
文件中:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
to simply load rvm into a single terminal, use
只需将 rvm 加载到单个终端中,请使用
source "$HOME/.rvm/scripts/rvm"
supposedly this call is more cross-platform:
据说这个调用更跨平台:
. "$HOME/.rvm/scripts/rvm"
回答by David J Roach V
Close and restart terminal after installing RVM — gets me EVERY TIME.
安装 RVM 后关闭并重新启动终端 - 每次都让我。
回答by CodeBiker
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
).
要开始使用 RVM,您需要进入source /Users/yourusername/.rvm/scripts/rvm
您的终端(当然,插入您的真实用户名代替yourusername
)。