2

我按照rvm上的官方指南安装了 RVM 。我安装了 Ruby 1.8.7,rvm install 1.8.7然后使用rvm 1.8.7 --default.

然后我尝试用 1.9.2 安装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变量被完全清除。

有没有人有这个问题的解决方案?

4

4 回答 4

4

要重新安装并重新开始删除 RVM,只需执行rm -rfv ~/.rvm并且rm ~/.rvmrc如果它在那里。

也许“在 OSX 上使用 RVM 安装 Rails 3 ”会对您有所帮助。

于 2010-09-12T18:43:34.000 回答
1

我有同样的问题,看起来整个 RVM 脚本都坏了。该rvm install ree命令没有失败,但是在运行时rvm use ree我开始遇到问题。

$PATH变量不为空,例如 with rvm use 1.9.2,但它错过了一些重要的路径,例如/binand /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 安装rvm implode并重新安装,但这没有用。

我想解决方案是降级或等待新版本。


解决方案已在 git 源中准备就绪:

rvm update --head && rvm reload

问题解决了,谢谢韦恩!

于 2010-09-12T19:36:51.860 回答
0

也许“如何在 Ubuntu 11.10 中安装 Ruby on Rails ”会对您有所帮助。

于 2012-01-20T13:27:25.207 回答
0

像这样的事情刚刚发生在我身上,经过仔细检查,我只是迷路/user/bin了。但为什么?

事实证明,经过一番调查,我之前遗漏了一个冒号$PATH,这导致默认路径(即/user/bin)中的第一个目录被省略。

一旦我将其更改
export PATH=$SCRIPTS:$WORKSPACE:$ANDROID_HOME:$HEROKU$PATH
为:
export PATH=$SCRIPTS:$WORKSPACE:$ANDROID_HOME:$HEROKU:$PATH

(注意在最后一个'$'之前添加的冒号)
一切都恢复了。显然,您的路径会有所不同,但请检查是否缺少冒号。

于 2015-02-04T01:03:54.533 回答