1

启动终端或使用 RVM 时,我不断收到此错误。我已经尝试删除 PATH ,但我仍然一无所获。

cat: /Users/admin/.rvm/VERSION: No such file or directory
    Warning! PATH is not properly set up, '/Users/admin/.rvm/gems/ruby-2.0.0-p247/bin' is not available,
             usually this is caused by shell initialization files - check them for 'PATH=...' entries,
             it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
             to fix temporarily in this shell session run: 'rvm use ruby-2.0.0-p247'.
    -bash: /Users/admin/.rvm/scripts/base: No such file or directory
    -bash: /Users/admin/.rvm/scripts/help: No such file or directory

我的 ~/.bash_profile,为简洁而编辑:

source ~/.rvm/scripts/rvm

PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
4

1 回答 1

1

你正在破坏你的路径

您需要在任何 PATH 自定义之后获取 RVM ,或者您只是破坏了 RVM 设置的值。目前,您正在采购 RVM,然后覆盖它创建的修改后的 PATH。根据您的启动文件配置,以下行应放在您的~/.bashrc,~/.profile或中的最后~/.bash_profile

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

除非您知道自己在做什么,否则不要在采购 RVM 后修改您的 PATH。即使这样,您仍需要确保将新 PATH 附加或预先添加到当前 PATH。例如,您可以在采购 RVM 后放置如下内容:

PATH=$HOME/foo/bar:$PATH
于 2013-08-19T15:41:24.477 回答