我正在尝试在dreamhost上设置我的ror网站,但是,我正在使用需要ruby gems 1.7.0及更高版本的gem(thumbs_up)。
目前的版本是:
terebellum]$ gem -v
1.3.7
我尝试运行“gem update --system”,我收到了这个错误:
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 subtle ways. The Debian-supported way to update rubygems is through apt-get, using 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.
请指教。见下面的日志。
谢谢
利莫
Installing thumbs_up (0.5.3) /usr/lib/ruby/1.8/rubygems/installer.rb:170:in `install': thumbs_up requires RubyGems version >= 1.7.0. Try 'gem update --system' to update RubyGems itself. (Gem::InstallError)
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/source.rb:95:in `install'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/installer.rb:55:in `run'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/installer.rb:44:in `run'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/installer.rb:8:in `install'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/cli.rb:271:in `update'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in `send'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in `run'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/invocation.rb: 118:in `invoke_task'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/base.rb:389:in `start'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/bin/bundle:13
from /usr/lib/ruby/gems/1.8/bin/bundle:19:in `load'
from /usr/lib/ruby/gems/1.8/bin/bundle:19
[terebellum]$ gem update --system
ERROR: While executing gem ... (RuntimeError)
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 subtle ways. The Debian-supported way to update rubygems is through apt-get, using 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.
[terebellum]$ gem -v
1.3.7
答案 0 :(得分:1)
我建议install RVM(因为Dreamhost wiki表示可以这样做)和你需要的Ruby版本(比如说rvm install 1.8.7
)。然后,只要您想要更新Rubygems,就可以运行rvm rubygems 1.7.0
(参见RubyGems CLI API)