2

我正在尝试在 32 位 Ubuntu EC2 AMI 上安装 Shapado,并将 ruby​​ 更新到 1.9.2 作为安装的一部分。但是,我收到此错误

ubuntu@domU....:/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

不是 ruby​​ 用户,我猜这与 gems/1.8 有关,但如果我尝试使用更新

gem update --system

我收到警告说此更新系统在 Debian 上已禁用。

ubuntu@domU-12-31-38-04-9E-D2:/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

4

1 回答 1

0

这在 Debian 中被设计为禁用。

gem update --system

而是使用这个:

apt-get install rubygems

如果您仍然遇到问题,建议您使用 Aptitude 卸载 RubyGems,然后从源代码重新安装。RubyGems 网站在此处提供说明。

于 2015-09-29T16:50:21.247 回答