RVM doesn't switch Rubies

后端 未结 5 527
一生所求
一生所求 2020-12-24 07:51

I\'m running Ruby 1.9.1p243 on CentOS, and I decided to install rvm to handle upgrading to 1.9.2 or downgrading to 1.8.7 (whichever turns out to work better for rails3).

5条回答
  •  攒了一身酷
    2020-12-24 08:06

    I've been struggling with setting default rvm ruby to no avail, until I've tried this:

    sudo bash -l -c 'rvm alias create default ruby-1.9.3-p392'
    

    "sudo" is for writing into /usr/local/rvm/config/alias (in my example it would contain "default=ruby-1.9.3-p392")
    "bash -l" is to make sure it runs all the scripts (/etc/profile, /etc/bash.bashrc, etc..) of login shell

提交回复
热议问题