[英]Installing Ruby 1.9.2 through RVM fails
我按照rvm上的官方指南安装了RVM。 我在rvm install 1.8.7
安装了Ruby 1.8.7,然后在rvm 1.8.7 --default
中将其设置为默认值。
然后我尝试使用rvm install 1.9.2
,还尝试了rvm install 1.9.2-head
。 一切顺利,直到我到达“ ruby-1.9.2-head-#installing-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
变量将被完全清除。
有人对此问题有解决方案吗?
要重新安装并重新启动RVM,只需执行rm -rfv ~/.rvm
和rm ~/.rvmrc
如果有)。
也许“ 在带有RVM的OSX上安装Rails 3 ”会为您提供帮助。
我有同样的问题,看起来整个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
并解决了问题,谢谢韦恩!
这样的事情刚发生在我身上,经过仔细检查,我只是在路径上缺少了/user/bin
。 但为什么?
事实证明,经过一番调查, 我在$PATH
之前缺少一个冒号 ,这导致默认路径(即/ user / bin)中的第一个目录被忽略。
一旦我改变了这个:
export PATH=$SCRIPTS:$WORKSPACE:$ANDROID_HOME:$HEROKU$PATH
对此:
export PATH=$SCRIPTS:$WORKSPACE:$ANDROID_HOME:$HEROKU:$PATH
(注意冒号在最后一个“ $”之前添加)
一切又恢复了。 显然,您的路径会有所不同,但请检查是否缺少冒号。
也许“ 如何在Ubuntu 11.10中安装Ruby on Rails ”将为您提供帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.