2013-02-03 40 views
2

我正試圖在32位Ubuntu EC2 AMI上安裝Shapado,並且在安裝之後將ruby更新爲1.9.2。不過,我得到這個錯誤如何將ubuntu上的ruby gem更新爲1.9?

[email protected]:/var/rails/shapado$ sudo rake gems:install 
rake aborted! 
Gemfile syntax error: 
/var/rails/shapado/Gemfile:87: syntax error, unexpected ':', expecting kEND 
gem 'sass-rails', git: 'https://github.com/rails/sas... 
        ^
/var/rails/shapado/Gemfile:87: syntax error, unexpected ',', expecting kEND 
...hub.com/rails/sass-rails.git', branch: '3-2-stable' 
         ^
/var/lib/gems/1.8/gems/bundler-1.2.3/lib/bundler/dsl.rb:35:in `eval_gemfile' 
/var/lib/gems/1.8/gems/bundler-1.2.3/lib/bundler/dsl.rb:7:in `evaluate' 
/var/lib/gems/1.8/gems/bundler-1.2.3/lib/bundler/definition.rb:18:in `build' 
/var/lib/gems/1.8/gems/bundler-1.2.3/lib/bundler.rb:144:in `definition' 
/var/lib/gems/1.8/gems/bundler-1.2.3/lib/bundler.rb:112:in `setup' 
/var/rails/shapado/config/boot.rb:8 
/var/rails/shapado/config/application.rb:1 
enter code here 

由於不是紅寶石用戶,我猜測它與寶石/ 1.8這樣做,但如果我嘗試使用更新

gem update --system 

我得到一個警告,這在Debian上禁用更新系統。

[email protected]:/var/rails/shapado$ gem update --system 
ERROR: gem update --system is disabled on Debian, because it will overwrite the 
content of the rubygems Debian package, and might break your Debian system in s 
ubtle ways. The Debian-supported way to update rubygems is through apt-get, usin 
g Debian official repositories. 
If you really know what you are doing, you can still update rubygems by setting 
the REALLY_GEM_UPDATE_SYSTEM environment variable, but please remember that this 
is completely unsupported by Debian. 

那麼,這是一個錯誤,有1.8寶石,如果是這樣,什麼是最好的方式來更新?如果這種方式更好,我可以把所有的東西都拿出來重新開始。我想我應該指定一個特定的版本,而不是僅僅遵循安裝說明http://shapado.com/questions/how-to-install-shapado-on-amazon-ec2

+0

當我運行Ruby <1.9時,我知道了這一點......你確定你真的切換到了Ruby 1.9.2嗎?你可以嘗試輸入ruby -v並看看你回來了什麼? – poshaughnessy

+0

嗯。我明確安裝紅寶石1.9.2但是,我看到1.8.7時,我試過:(時間去核試,再試一次。 –

+0

即使在sudo更新替代 - 配置紅寶石,然後寶石,與紅寶石-v給我ruby1.9.3問題依然存在 –

回答

0

這在設計中被Debian禁用。

gem update --system 

而是使用此:

apt-get install rubygems 

如果您仍然有問題,建議您卸載RubyGems的使用資質,並從源頭重新安裝。 RubyGems網站提供說明here

相關問題