Ruby on Rails:无法使用gem更新进行更新

时间:2011-12-01 21:29:01

标签: ruby-on-rails ruby ruby-on-rails-3

正在运行gem -v

1.8.11

正在运行gem update

Updating installed gems
Updating actionmailer
Fetching: activesupport-3.1.3.gem (100%)
Fetching: activemodel-3.1.3.gem (100%)
Fetching: sprockets-2.0.3.gem (100%)
Fetching: actionpack-3.1.3.gem (100%)
Fetching: actionmailer-3.1.3.gem (100%)
Successfully installed activesupport-3.1.3
Successfully installed activemodel-3.1.3
Successfully installed sprockets-2.0.3
Successfully installed actionpack-3.1.3
Successfully installed actionmailer-3.1.3
Updating activerecord
Fetching: activerecord-3.1.3.gem (100%)
Successfully installed activerecord-3.1.3
Updating activeresource
Fetching: activeresource-3.1.3.gem (100%)
Successfully installed activeresource-3.1.3
Updating childprocess
Fetching: childprocess-0.2.3.gem (100%)
Successfully installed childprocess-0.2.3
Updating columnize
Fetching: columnize-0.3.5.gem (100%)
Successfully installed columnize-0.3.5
Updating cucumber
Fetching: gherkin-2.6.8.gem (100%)
Building native extensions.  This could take a while...
Fetching: cucumber-1.1.3.gem (100%)

(::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)

Thank you for installing cucumber-1.1.3.
Please be sure to read http://wiki.github.com/cucumber/cucumber/upgrading
for important information about this release. Happy cuking!

(::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)

Successfully installed gherkin-2.6.8
Successfully installed cucumber-1.1.3
Updating devise
Fetching: devise-1.5.2.gem (100%)
Successfully installed devise-1.5.2
Updating factory_girl
Fetching: factory_girl-2.3.2.gem (100%)
Successfully installed factory_girl-2.3.2
Updating jquery-rails
Fetching: jquery-rails-1.0.19.gem (100%)
Successfully installed jquery-rails-1.0.19
Updating json
Fetching: json-1.6.3.gem (100%)
Building native extensions.  This could take a while...
Successfully installed json-1.6.3
Updating json_pure
Fetching: json_pure-1.6.3.gem (100%)
Successfully installed json_pure-1.6.3
Updating multi_json
Fetching: multi_json-1.0.4.gem (100%)
Successfully installed multi_json-1.0.4
Updating passenger
Fetching: passenger-3.0.11.gem (100%)
Successfully installed passenger-3.0.11
Updating rails
Fetching: railties-3.1.3.gem (100%)
Fetching: rails-3.1.3.gem (100%)
Successfully installed railties-3.1.3
Successfully installed rails-3.1.3
Updating rubyzip
Fetching: rubyzip-0.9.5.gem (100%)
Successfully installed rubyzip-0.9.5
Updating sass
Fetching: sass-3.1.11.gem (100%)
Successfully installed sass-3.1.11
Updating selenium-webdriver
Fetching: selenium-webdriver-2.14.0.gem (100%)
Successfully installed selenium-webdriver-2.14.0
Gems updated: activesupport, activemodel, sprockets, actionpack, actionmailer, activerecord, activeresource, childprocess, columnize, gherkin, cucumber, devise, factory_girl, jquery-rails, json, json_pure, multi_json, passenger, railties, rails, rubyzip, sass, selenium-webdriver
Installing ri documentation for activesupport-3.1.3...
Installing ri documentation for activemodel-3.1.3...
Installing ri documentation for sprockets-2.0.3...
Installing ri documentation for actionpack-3.1.3...
Installing ri documentation for actionmailer-3.1.3...
Installing ri documentation for activerecord-3.1.3...
Installing ri documentation for activeresource-3.1.3...
Installing ri documentation for childprocess-0.2.3...
Installing ri documentation for columnize-0.3.5...
Installing ri documentation for gherkin-2.6.8...
Installing ri documentation for cucumber-1.1.3...
Installing ri documentation for devise-1.5.2...
Installing ri documentation for factory_girl-2.3.2...
Installing ri documentation for jquery-rails-1.0.19...
Installing ri documentation for json-1.6.3...
Installing ri documentation for json_pure-1.6.3...
Installing ri documentation for multi_json-1.0.4...
Installing ri documentation for passenger-3.0.11...
Installing ri documentation for railties-3.1.3...
Installing ri documentation for rails-3.1.3...
Installing ri documentation for rubyzip-0.9.5...
Installing ri documentation for sass-3.1.11...
Installing ri documentation for selenium-webdriver-2.14.0...
ERROR:  While executing gem ... (ArgumentError)
    marshal data too short

我该怎么办?

2 个答案:

答案 0 :(得分:1)

你的意思是:

gem update --system

或者您想要更新特定的gem:

gem update rails

答案 1 :(得分:1)

尝试制作~/.gems文件夹的备份副本,然后清除它,然后再次运行该命令。

参考:http://keyj.wordpress.com/2009/03/20/error-with-rubygems-marshal-data-too-short/