我刚刚完成了RVM的安装。
我执行了以下命令:
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)一切都进行得很顺利。然后在我的用户主目录中,在.bash_profile中添加了
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*然后我启动了一个新的shell,以确保这一点。然后我试着
rvm 得到的错误是
No command 'rvm' found你知道为什么会发生这种情况吗?
发布于 2011-04-22 08:11:18
您是否看到了this页面上的“疑难解答安装”部分。
它提到你需要从你的.bashrc中删除return。我经常忘记在新安装的ubuntu上这样做。
他们给ubuntu的例子就是改变这一点:
[ -z "$PS1" ] && return
# Some code here... e.g.
export HISTCONTROL=ignoreboth要这样做:
if [[ -n "$PS1" ]]; then
# Some code here... e.g.
export HISTCONTROL=ignoreboth
fi
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session发布于 2011-04-22 08:31:30
也许是因为.bash_profile只在登录时运行,如果您运行一个新的shell,它只执行.bashrc
您可以使用以下命令进行测试
> bash -lhttps://stackoverflow.com/questions/5750981
复制相似问题