marshal data too short (ArgumentError)

在执行`bundle install`后遇到了'marshal data too short'的ArgumentError。这通常意味着Gemfile或Gemfile.lock文件可能损坏或不完整。解决方案可能包括删除Gemfile.lock,清理gem缓存,或者重新初始化Gemfile。

bundle install 之后

整体错误如下所示:

/home/duan/.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 /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/fetcher.rb:168:in `fetch_d
ependency_remote_specs'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/fetcher.rb:125:in `fetch_r
emote_specs'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/fetcher.rb:128:in `fetch_r
emote_specs'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/fetcher.rb:128:in `fetch_r
emote_specs'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/fetcher.rb:128:in `fetch_r
emote_specs'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/fetcher.rb:128:in `fetch_r
emote_specs'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/fetcher.rb:73:in `specs'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/source.rb:234:in `block in
 remote_specs'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/source.rb:232:in `each'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/source.rb:232:in `remote_s
pecs'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/source.rb:165:in `fetch_sp
ecs'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/source.rb:70:in `specs'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/definition.rb:191:in `bloc
k (2 levels) in index'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/definition.rb:188:in `each
'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/definition.rb:188:in `bloc
k in index'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/index.rb:9:in `build'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/definition.rb:184:in `inde
x'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/definition.rb:178:in `reso
lve'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/definition.rb:113:in `spec
s'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/definition.rb:108:in `reso
lve_remotely!'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/installer.rb:81:in `run'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/installer.rb:14:in `instal
l'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/cli.rb:230:in `install'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/vendor/thor/task.rb:27:in 
`run'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/vendor/thor/invocation.rb:
120:in `invoke_task'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/vendor/thor.rb:275:in `dis
patch'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/vendor/thor/base.rb:408:in
 `start'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/bin/bundle:14:in `block in <main>'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/lib/bundler/friendly_errors.rb:4:in `w
ith_friendly_errors'
        from /home/duan/.rvm/gems/ruby-1.9.3-p374@global/gems/bundler-1.2.3/bin/bundle:14:in `<main>'
Fetching gem metadata from https://rubygems.org/.....Unfortunately, a fatal error has occurred. Please see the Bun
dler 
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks! 
几经周折 最后发现其实是安装的gem已经取消才报的这个错 fuck!
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值