How do I change my Ruby version using RVM?

前端 未结 13 1180
我寻月下人不归
我寻月下人不归 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条回答
  •  猫巷女王i
    2020-12-02 05:27

    On a clean install of Ubuntu 12.04 I ran into the same issue. The RVM installer creates or appends to a file called ~/.bash_login the necessary bit of code to avoid the original problem:

    [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
    

    However this does not seem to get invoked. Adding it to ~/.bashrc resolved the issue for me.

提交回复
热议问题