RVM多用户BUG

刚才更新了一下rvm的版本,更新到了latest(1.10.0),感觉不错。但是有一个令人崩溃的问题,就是当你用Multi-User模式安装rvm,然后切换默认ruby版本的时候会出现:

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

这令我很崩溃啊,研究了一上午,原因没有发现,倒是找出解决方法来了,那就是用sudo -H -i或者是rvmsudo bash命令切换到root模式下,然后rvm –default use XXX。新年快乐。

One thought on “RVM多用户BUG

  1. 我也出了这个问题,用你的方法不行。我的解决方法 是
    Run this once to add the line that loads rvm into your ~/.bash_profile

    $ echo ‘[[ -s "$HOME/.rvm/scripts/rvm" ]] && . “$HOME/.rvm/scripts/rvm” # Load RVM function’ >> ~/.bash_profile

    然后退出SHELL 重登陆。
    niuniuqiu@niuniuqiu:~$ rvm use 1.9.3
    Using /home/niuniuqiu/.rvm/gems/ruby-1.9.3-p0

    —————————–.bash_profile like this —————————-
    niuniuqiu@niuniuqiu:~$ tail .bash_profile
    fi

    # set PATH so it includes user’s private bin if it exists
    if [ -d "$HOME/bin" ] ; then
    PATH=”$HOME/bin:$PATH”
    fi

    [[ -s "$HOME/.rvm/scripts/rvm" ]] && . “$HOME/.rvm/scripts/rvm” # Load RVM function

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">