2013-11-28 101 views
0

我試圖在我的Debian服務器上安裝Ruby 2.0,並決定通過RVM來做到這一點。我下載它使用:爲什麼RVM試圖用'rvm install'命令來安裝Rubygems而不是Ruby?

~$ \curl -L https://get.rvm.io | bash -s stable 

但是,當我嘗試安裝Ruby,它看起來像RVM試圖安裝Rubygems代替。

~$ rvm install 2.0.0 
=> 'ruby' was not found, cannot install rubygems unless ruby is present (Do you have an RVM ruby installed & selected?) 

我檢查了RVM文件和rvm install <ruby version>絕對是安裝Ruby,RubyGems的不是命令。那麼爲什麼會出現上述問題?謝謝!

編輯:

的 'RVM信息' 輸出:的 'RVM要求' [name]@debian-server:~/.rvm/rubies$ rvm info

system: 
uname:  "Linux debian-server 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2+deb7u2 x86_64 GNU/Linux" 
system:  "debian/7/x86_64" 
bash:  "/bin/bash => GNU bash, version 4.2.37(1)-release (x86_64-pc-linux-gnu)" 
zsh:   " => not installed" 

rvm: 
version:  "rvm 1.24.5 (stable) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]" 
updated:  "33 minutes 56 seconds ago" 
path:   "/home/[name]/.rvm" 

homes: 
gem:   "not set" 
ruby:   "not set" 

binaries: 
ruby:   "" 
irb:   "" 
gem:   "" 
rake:   "/home/[name]/.rvm/bin/rake" 

environment: 
PATH:    "/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/[name]/.rvm/bin" 
GEM_HOME:  "" 
GEM_PATH:  "" 
MY_RUBY_HOME: "" 
IRBRC:  "" 
RUBYOPT:  "" 
gemset:  "" 

輸出:

~$ rvm requirements 
Checking requirements for debian. Requirements installation successful. 
+0

是'rvm requirements'通過了嗎? – BuDen

+0

除了@ BuDen的建議,運行'rvm info' –

+0

'rvm'嘗試安裝'rubygems'作爲其安裝過程的一部分。也許它找不到它安裝的'ruby'? – tadman

回答

1

我不知道我理解你如何到達這一情況,但如果你想通過RVM安裝ruby 2.0,那麼我會建議如下:

rvm implode 
\curl -L https://get.rvm.io | bash -s stable --ruby 

然後確保您的源〜/ .bash_profile(如安裝輸出中所述)在每個新shell中加載RVM。

+0

我也不明白!我使用'rvm implode'刪除了RVM,重新登錄並使用該命令安裝了RVM腳本。同樣的錯誤。不管怎樣,謝謝你! – hlh

+0

「rvm list」的輸出是什麼? – grenierm5

+1

'rvm rubies' '#尚未安裝rvm紅寶石。嘗試'rvm help install'。' – hlh