我通過apt-get安裝了Ruby 1.8.7。然後我通過RVM安裝了1.9.1。RVM無法切換到Ruby 1.9.1
的RVM 1.9.1安裝成功:
root: rvm install 1.9.1
<i>Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.1-p378 </i>
<i>/usr/local/rvm/src/ruby-1.9.1-p378 has already been extracted. </i>
<i>Configuring ruby-1.9.1-p378, this may take a while depending on your cpu(s)... </i>
<i>Compiling ruby-1.9.1-p378, this may take a while, depending on your cpu(s)... </i>
<i>Installing ruby-1.9.1-p378 </i>
<i>Installation of ruby-1.9.1-p378 is complete. </i>
<i>Updating rubygems for /usr/local/rvm/gems/[email protected] </i>
<i>Updating rubygems for /usr/local/rvm/gems/ruby-1.9.1-p378 </i>
<i>adjusting shebangs for ruby-1.9.1-p378 (gem irb erb ri rdoc testrb rake). </i>
<i>Installing gems for ruby-1.9.1-p378 (rdoc rake). </i>
<i>Installing rdoc to /usr/local/rvm/gems/[email protected] </i>
<i>Installing rdoc to /usr/local/rvm/gems/ruby-1.9.1-p378 </i>
<i>Installing rake to /usr/local/rvm/gems/[email protected] </i>
<i>Installing rake to /usr/local/rvm/gems/ruby-1.9.1-p378 </i>
<i>Installation of gems for ruby-1.9.1-p378 is complete. </i>
但是,我不能讓RVM切換到新的版本:
root: ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
root: rvm 1.9.1
root: ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
儘管如此,它似乎已經安裝罰款:
root: /usr/local/rvm/bin/ruby-1.9.1-p378 -v
ruby 1.9.1p378 (2010-01-10 revision 26273) [x86_64-linux]
我也嘗試設置RVM --default到1.9.1,但沒有幫助。
爲什麼RVM不能切換到新版本?我應該爲ruby = 1.9.1設置一個別名嗎?
*運行Debian
檢查你的/ usr/bin中/或/ usr/local/bin目錄/ ruby'二進制文件的目錄。它是一個ruby1.8.7的符號鏈接?如果是這樣,請將其更改爲1.9.1 – Paul 2010-05-21 19:19:28
這是根安裝的典型問題。最好堅持本地用戶安裝,下次再安裝。 – Red 2015-05-22 07:32:16