How do I change my Ruby version using RVM?

前端 未结 13 1182
我寻月下人不归
我寻月下人不归 2020-12-02 04:49

I am not able to switch the current Ruby version:

➜  ~  rvm list

rvm rubies

   ruby-1.9.2-p290 [ x86_64 ]
   ruby-1.9.3-p0 [ x86_64 ]

➜  ~  rvm use ruby-1         


        
13条回答
  •  一个人的身影
    2020-12-02 05:27

    In my case on Ubuntu, the entry in ~/.bashrc had:

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

    instead of:

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

    Notice the missing space between . and "$HOME.

    Also, if this is the problem, you should also be noticing an error on top when you start your terminal.

提交回复
热议问题