加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – bundle更新失败:组织数据太短

发布时间:2020-12-16 22:41:28 所属栏目:百科 来源:网络整理
导读:$bundle updateFetching 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
$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>'

解决方法

尝试从您的Gemfile中的HTTP更改为HTTPS:

更改:

source 'http://rubygems.org'

至:

source 'https://rubygems.org'

根据Hacker News,Rubygems.org was compromised的这篇文章.
更多信息:Marshal data too short error和https for rubygems.org in the Gemfile?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读