以上第一次不工作,第二次工作。使用rvm 2.0.0時出現「Warning!PATH設置不正確」 - 默認
嘗試爲任何新的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
似乎違反直覺的,如果RVM要在頂部移至底部鏈條? – reneruiz
rvm需要位於文件的底部,以防重新定義路徑中的其他行。[ba | z] shrc。對於Homebrew,'export PATH =「/ usr/local/bin:/ usr/local/sbin:$ PATH」'可能是一種常見的與rvm衝突的問題。 – TimeEmit
我把它放在我的.bash_profile的底部,因爲我重新定義了幾次路徑。這也有效。 –