我在 Mac OS x 10.8.2(“Mountain Lion”)上,并且成功安装了 RVM 1.17.8 及其依赖项。我可以使用它来安装 Ruby 版本,但是如果没有出现此错误rvm install 1.9.2
,我将无法执行:rvm use <version>
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.
我在 ~/.bash_profile 中有以下内容,我已将其设置为在source ~/.bash_profile
启动终端窗口时使用 运行:
export SVN_EDITOR=vim
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
[ -r ~/.bashrc ] && source ~/.bashrc
我试过 running source ~/.rvm/scripts/rvm
,它运行时没有返回错误,但是当我尝试使用 RVM 在终端会话中设置 Ruby 版本时,我仍然收到“RVM is not a function”错误。
我还尝试使用rvm implode
. 我的想法已经用完了,我似乎无法在网上找到更多解决方案。帮助?