我按照rvm上的官方指南安装了RVM。我使用rvm install 1.8.7
安装了Ruby 1.8.7,然后使用rvm 1.8.7 --default
将其设置为默认值。
然后我尝试使用rvm install 1.9.2
安装1.9.2,并尝试rvm install 1.9.2-head
。一切都很顺利,直到我进入“ruby-1.9.2-head - #installation-part”。
然后我收到一个巨大的错误列表抱怨我的* nix bash命令:
/Home/kevin/.rvm/scripts/Manager: line 1760: sed: command not found
/Home/kevin/.rvm/scripts/Manager: line 1762: mv: command not found
/Home/kevin/.rvm/scripts/Manager: line 1762: chmod: command not found
/Home/kevin/.rvm/scripts/Manager: line 1632: cp: command not found
/Usr/bin/env: bash: The file or directory does not exist
/Home/kevin/.rvm/scripts/utilities: line 233: mkdir: command not found
/Home/kevin/.rvm/scripts/utilities: line 237: date: command not found
/Usr/bin/env: bash: The file or directory does not exist
/Usr/bin/env: bash: The file or directory does not exist
/Home/kevin/.rvm/scripts/utilities: line 233: mkdir: command not found
/Home/kevin/.rvm/scripts/utilities: line 237: date: command not found
/Usr/bin/env: bash: The file or directory does not exist
/Home/kevin/.rvm/scripts/Manager: line 1736: mkdir: command not found
/Home/kevin/.rvm/scripts/Manager: line 1738: ln: command not found
/Home/kevin/.rvm/scripts/Manager: line 1760: sed: command not found
/Home/kevin/.rvm/scripts/Manager: line 1762: mv: command not found
/Home/kevin/.rvm/scripts/Manager: line 1762: chmod: command not found
/Home/kevin/.rvm/scripts/Manager: line 1760: sed: command not found
/Home/kevin/.rvm/scripts/Manager: line 1762: mv: command not found
/Home/kevin/.rvm/scripts/Manager: line 1762: chmod: command not found
/Usr/bin/env: bash: The file or directory does not exist
/Home/kevin/.rvm/scripts/utilities: line 233: mkdir: command not found
/Home/kevin/.rvm/scripts/utilities: line 237: date: command not found
/Usr/bin/env: bash: The file or directory does not exist
/Usr/bin/env: bash: The file or directory does not exist
/Home/kevin/.rvm/scripts/Manager: line 1562: cp: command not found
/Home/kevin/.rvm/scripts/Manager: line 1573: chmod: command not found
/Home/kevin/.rvm/scripts/Manager: line 1562: cp: command not found
/Home/kevin/.rvm/scripts/Manager: line 1573: chmod: command not found
/Home/kevin/.rvm/scripts/Manager: line 1562: cp: command is not
/Home/kevin/.rvm/scripts/Manager: line 1573: chmod: command not found
/Home/kevin/.rvm/scripts/Manager: line 1562: cp: command not found
/Home/Kevin/.rvm/scripts/Manager: line 1573: chmod: command not found
/Home/kevin/.rvm/scripts/Manager: line 1562: cp: command not found
/Home/kevin/.rvm/scripts/Manager: line 1573: chmod: command not found
/Home/kevin/.rvm/scripts/Manager: line 1562: cp: command not found
/Home/kevin/.rvm/scripts/Manager: line 1573: chmod: command not found
/Home/kevin/.rvm/scripts/Manager: line 1562: cp: command not found
/Home/kevin/.rvm/scripts/Manager: line 1573: chmod: command not found
/Usr/bin/env: bash: The file or directory does not exist
/Home/kevin/.rvm/scripts/utilities: line 276: mkdir: command not found
/Home/kevin/.rvm/scripts/utilities: line 280: date: command not found
/Usr/bin/env: bash: The file or directory does not exist
/Home/kevin/.rvm/scripts/utilities: line 656: cp: command not found
/Usr/bin/env: bash: The file or directory does not exist
如果我输入rvm 1.9.2 --default
,我会得到相同的错误输出,并且我的$PATH
变量已完全清除。
有没有人能解决这个问题?
答案 0 :(得分:4)
要重新安装并重新开始删除RVM,只需rm -rfv ~/.rvm
和rm ~/.rvmrc
(如果有)。
也许“Install Rails 3 on OSX with RVM”会帮助你。
答案 1 :(得分:1)
我遇到同样的问题,看起来整个RVM脚本都坏了。 rvm install ree
命令没有失败但是在运行rvm use ree
时我开始遇到问题。
$PATH
变量不为空,与rvm use 1.9.2
一样,但它错过了/bin
和/usr/bin
等重要路径。
以下是控制台会话示例:
calas@chamonix:~$ ls
Desktop dev Documents ...
calas@chamonix:~$ rvm use ree
info: Using /home/calas/.rvm/gems/ree-1.8.7-2010.02
calas@chamonix:~$ ls
Command 'ls' is available in '/bin/ls'
The command could not be located because '/bin' is not included in the PATH environment variable.
ls: command not found
calas@chamonix:~$ rvm info
Command 'sed' is available in '/bin/sed'
The command could not be located because '/bin' is not included in the PATH environment variable.
sed: command not found
bash: grep: No such file or directory
bash: mkdir: No such file or directory
bash: grep: No such file or directory
/usr/bin/env: bash: No such file or directory
运行rvm info
后,$PATH
变量为空。
我使用rvm implode
删除了整个RVM安装并重新安装但是没有用。
我想解决方案是降级或等待新版本。
解决方案已在git源中准备就绪:
rvm update --head && rvm reload
问题解决了,谢谢Wayne!
答案 2 :(得分:0)
答案 3 :(得分:0)
这样的事情刚好发生在我身上,经过仔细检查,我在路上只缺少/user/bin
。但为什么呢?
经过一些调查后, 我在$PATH
之前错过了冒号,这导致默认路径中的第一个目录(即/ user / bin)被省略。
一旦我改变了这一点:
export PATH=$SCRIPTS:$WORKSPACE:$ANDROID_HOME:$HEROKU$PATH
对此:
export PATH=$SCRIPTS:$WORKSPACE:$ANDROID_HOME:$HEROKU:$PATH
(注意在最后一个'$'之前添加的冒号)
一切都恢复了。显然,你的路径会有所不同,但要检查是否缺少冒号。