以上第一次不起作用,第二次起作用。
尝试将任何新的 shell 窗口的 ruby 版本设置为 2.0.0。
正在做
$ rvm use 2.0.0 --default
给
Warning! PATH is not properly set up, '/home/durrantm/.rvm/gems/ruby-1.9.3-p125/
bin' is not at first place,
usually this is caused by shell initialization files - check them for '
PATH=...' entries,
it might also help to re-add RVM to your dotfiles: 'rvm get stable --au
to-dotfiles',
to fix temporarily in this shell session run: 'rvm use ruby-1.9.3-p125'
.
Using /home/durrantm/.rvm/gems/ruby-2.0.0-p247
然后做同样的事情
$ rvm use 2.0.0 --default
现在没有错误,即
$ rvm use 2.0.0 --default
Using /home/durrantm/.rvm/gems/ruby-2.0.0-p247
durrantm.../durrantm$
但新窗口仍然给我 ruby 1.9.3,而不是 2.0.0
我的.bashrc
文件里面有:
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
[[ -s "/home/durrantm/.rvm/scripts/rvm" ]] && . "/home/durrantm/.rvm/scripts/rvm"
我的 .bash_profile 有:
source ~/.profile
case $- in *i*) . ~/.bashrc;; esac
试
rvm get stable
似乎有效,但在很多绿色输出结束时显示:
Could not update RVM, get some help at #rvm IRC channel at freenode servers.
一个新的终端窗口rvm list rubies
显示:
$ rvm list rubies
Warning! PATH is not properly set up, '/home/durrantm/.rvm/gems/ruby-1.9.3-p125/bin' is not at first place,
usually this is caused by shell initialization files - check them for 'PATH=...' entries,
it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
to fix temporarily in this shell session run: 'rvm use ruby-1.9.3-p125'.
rvm rubies
=> ruby-1.9.3-p125 [ x86_64 ]
ruby-1.9.3-p194 [ x86_64 ]
* ruby-2.0.0-p247 [ x86_64 ]
# => - current
# =* - current && default
# * - default