最佳答案
以上第一次不起作用,第二次起作用。
对于任何新的 shell 窗口,尝试将 ruby version 设置为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
我的 .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