12
-bash: /etc/profile.d/rvm.sh: No such file or directory
-bash: /Users/janekambani/.bash_profile: line 1: conditional binary operator expected
-bash: /Users/janekambani/.bash_profile: line 1: syntax error near `"$HOME/.rvm/scripts/rvm"'
-bash: /Users/janekambani/.bash_profile: line 1: `[[ -s "$HOME/.rvm/scripts/rvm"]] && . "$HOME/.rvm/scripts/rvm" '

我试过这个:

sudo rm -rf /etc/rvmrc /etc/profile.d/rvm.sh /usr/local/rvm /usr/local/bin/rvm $HOME/.rvm $HOME/.rvmrc

但我仍然不断收到同样的错误。我使用 OS X 10.8

4

4 回答 4

17

查看 /etc/profile 的来源。

在 Mac OS 10.8 上,在使用 sudo 安装 RVM 时,会在 /etc/profile.d/rvm.sh 中添加一行。即使您使用 删除 RVM rvm implode,该衬里仍会保留在那里,并会导致该错误在任何终端启动时显示。

于 2012-09-25T18:23:39.110 回答
8

使用您最喜欢的文本编辑器(nanovim等)打开/etc/profile并注释掉这两行:

source /etc/profile.d/sm.sh
source /etc/profile.d/rvm.sh

然后保存文件。

于 2013-01-02T04:08:15.223 回答
7

To fix any issues with sourcing RVM use:

rvm get stable --auto-dotfiles #OR:
rvm get head --auto-dotfiles

It will remove existing sourcing lines and add new ones that are meant to work.

于 2012-03-23T14:05:16.237 回答
0

这是由于 RVM 安装不正确(至少尝试安装 shell 加载程序的部分不正确)。您最近尝试安装 RVM吗?

有些东西一直试图插入 RVM 加载代码,结果一团糟。

这是我的建议:

  1. 为您的.bash_profile.
  2. 在文本编辑器中打开它并删除所有内容,但:

    export PATH=/Applications/SenchaSDKTools-2.0.0-Developer-Preview:$PATH 
    export PATH=/Applications/SenchaSDKTools-2.0.0-Developer-Preview/command:$PATH
    export PATH=/Applications/SenchaSDKTools-2.0.0-Developer-Preview/jsbuilder:$PATH
    

在下面添加这一行:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

保存并打开另一个终端,看看错误是否消失。

于 2012-03-23T13:57:32.260 回答