1
$ shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'
Login shell
$ type rvm | head -n 1
rvm is a function
-bash: type: write error: Broken pipe

然而:

$ rvm --default use 1.9.2

RVM is not a function, selecting rubies with 'rvm use ...' will not work.

You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use `/bin/bash --login` as the command.
Please visit https://rvm.io/integration/gnome-terminal/ for a example.

我删除了 ~/.rvm/ 并尝试使用再次安装,curl -L https://get.rvm.io | bash -s stable --auto但这没有帮助。这是一个远程 Ubuntu 13.04,我已经 ssh 进入,使用密钥进行身份验证。有什么建议吗?

4

1 回答 1

1

我两次采购 ~/.rvm/bin/rvm 脚本。在卸载重装过程中,曾经碰巧没有修改~/.bash_profile。然后我手动完成了这个。第二次卸载/重新安装舞蹈然后产生了 ~/.bash_profile :

source ~/.bashrc

# (lines added by me)
if [ -f /ubuntu/.rvm/bin/rvm ]; then
  source '/ubuntu/.rvm/bin/rvm'  > /dev/null
fi

# (lines added by RVM installer using: curl -L https://get.rvm.io | bash -s stable --auto-dotfiles)    
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
于 2013-07-08T11:33:11.007 回答