以上第一次无效,第二次有效。
尝试将任何新的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$
但是新窗口仍然给我红宝石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
~/.bashrc
,~/.bash_profile
运行rvm get stable --auto-dotfiles
,重新检查~/.bashrc
,~/.bash_profile
以及~/.profile
无数次......这个答案终于定了!然:rvm reset
它摆脱了警告!(恕我直言... RVM太遥不可及了……如果我在路径中先设置其他内容,我知道我在做什么)