本文介绍了软件包更新失败:编组数据太短的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  $ bundle update 
从http://rubygems.org/获取gem元数据。不幸的是,发生了一个致命错误。请参阅http://bit.ly/bundler-issues上的Bundler
疑难解答文档。谢谢!
/Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/fetcher.rb:168:in`load':封送数据short(ArgumentError)
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/fetcher.rb:168:in`fetch_dependency_remote_specs '来自/Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/fetcher.rb:125:in'fetch_remote_specs'$ b的
$ b from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/fetcher.rb:128:in`fetch_remote_specs'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/fetcher.rb:73:in`specs'
from / Users / macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/source.rb:234:在`block in remote_specs'
from / Users / macbook /.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/source.rb:232:in from'Users/macbook/.rvm'中的每个'
' /gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bund ler / source.rb:232:位于`remote_specs'
/Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/source .rb:165:在`fetch_specs'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/source.rb: 70:来自/Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/definition.rb:191:in的`specs'
`从/Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/definition.rb索引'
中的块(2级) 188:来自/Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/definition.rb:188:in的`each'
`block in index'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/index.rb:9:in`从/Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/definition.rb:184:in`index'$建立'
' b / b from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/definition.rb:1 78:在'resolve'中
来自/Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/definition.rb:113:in `specs'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/definition.rb:108:in`resolve_remotely! '/ b $ b from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/installer.rb:81:in'run'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/installer.rb:14:in`install'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/cli.rb:291:in`update'
from / Users / macbook /.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/vendor/thor/task.rb:27:在`run'中运行
from / Users /macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/vendor/thor/invocation.rb:120:in`invoke_task'
from / Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/vendor/thor.rb:275:in`dispatc h'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/vendor/thor/base.rb:408:in `start'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/bin/bundle:14:in`block in< top(必需)>'来自/Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/friendly_errors.rb:4:in的
` with_friendly_errors'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/bin/bundle:14:in`< top(required)> ;'来自/Users/macbook/.rvm/的/Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/bin/bundle:19:in`load'
中的
gems/ruby-1.9.3-p374@global/bin/bundle:19:在< main>'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/ bin / ruby​​_noexec_wrapper:14:在`eval'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/bin/ruby_noexec_wrapper:14:in`< main>'


解决方案

尝试从HTTP更改为HTTPS i你的Gemfile:

更改:

  source'http:/ /rubygems.org'

收件人:

 来源'https://rubygems.org'

记录这篇文章来自Hacker News,。
更多信息:和


$ bundle update
Fetching gem metadata from http://rubygems.org/..Unfortunately, a fatal error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
/Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/fetcher.rb:168:in `load': marshal data too short (ArgumentError)
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/fetcher.rb:168:in `fetch_dependency_remote_specs'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/fetcher.rb:125:in `fetch_remote_specs'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/fetcher.rb:128:in `fetch_remote_specs'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/fetcher.rb:73:in `specs'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/source.rb:234:in `block in remote_specs'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/source.rb:232:in `each'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/source.rb:232:in `remote_specs'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/source.rb:165:in `fetch_specs'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/source.rb:70:in `specs'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/definition.rb:191:in `block (2 levels) in index'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/definition.rb:188:in `each'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/definition.rb:188:in `block in index'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/index.rb:9:in `build'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/definition.rb:184:in `index'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/definition.rb:178:in `resolve'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/definition.rb:113:in `specs'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/definition.rb:108:in `resolve_remotely!'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/installer.rb:81:in `run'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/installer.rb:14:in `install'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/cli.rb:291:in `update'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/vendor/thor/task.rb:27:in `run'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/vendor/thor.rb:275:in `dispatch'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/vendor/thor/base.rb:408:in `start'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/bin/bundle:14:in `block in <top (required)>'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/friendly_errors.rb:4:in `with_friendly_errors'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/bin/bundle:14:in `<top (required)>'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/bin/bundle:19:in `load'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/bin/bundle:19:in `<main>'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/macbook/.rvm/gems/ruby-1.9.3-p374@global/bin/ruby_noexec_wrapper:14:in `<main>'
解决方案

Try to change from HTTP to HTTPS in your Gemfile:

Change:

source 'http://rubygems.org'

To:

source 'https://rubygems.org'

Acording this article from Hacker News, Rubygems.org was compromised.More info: Marshal data too short error and https for rubygems.org in the Gemfile?

这篇关于软件包更新失败:编组数据太短的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 22:52