4

当我进行捆绑安装时,出现以下异常。这是什么?

rajesh@rajesh:~/workspace/Cybermedia_Test$ bundle install
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! 
/home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.4/lib/bundler/fetcher.rb:174:in `load': marshal data too short (ArgumentError)
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.4/lib/bundler/fetcher.rb:174:in `fetch_dependency_remote_specs'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.4/lib/bundler/fetcher.rb:128:in `fetch_remote_specs'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.4/lib/bundler/fetcher.rb:76:in `specs'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.4/lib/bundler/source.rb:234:in `block in remote_specs'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.4/lib/bundler/source.rb:232:in `each'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.4/lib/bundler/source.rb:232:in `remote_specs'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.4/lib/bundler/source.rb:165:in `fetch_specs'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.4/lib/bundler/source.rb:70:in `specs'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.4/lib/bundler/lazy_specification.rb:53:in `__materialize__'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.4/lib/bundler/spec_set.rb:86:in `block in materialize'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.4/lib/bundler/spec_set.rb:83:in `map!'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.4/lib/bundler/spec_set.rb:83:in `materialize'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.4/lib/bundler/definition.rb:113:in `specs'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.4/lib/bundler/definition.rb:108:in `resolve_remotely!'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.4/lib/bundler/installer.rb:83:in `run'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.4/lib/bundler/installer.rb:14:in `install'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.4/lib/bundler/cli.rb:231:in `install'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.4/lib/bundler/vendor/thor/task.rb:27:in `run'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.4/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.4/lib/bundler/vendor/thor.rb:275:in `dispatch'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.4/lib/bundler/vendor/thor/base.rb:408:in `start'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.4/bin/bundle:14:in `block in <top (required)>'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.4/lib/bundler/friendly_errors.rb:4:in `with_friendly_errors'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.4/bin/bundle:14:in `<top (required)>'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/bin/bundle:19:in `load'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385@global/bin/bundle:19:in `<main>'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385/bin/ruby_noexec_wrapper:14:in `eval'
    from /home/rajesh/.rvm/gems/ruby-1.9.3-p385/bin/ruby_noexec_wrapper:14:in `<main>'

*当地宝石*

actionmailer (3.1.3)
actionpack (3.1.3)
activemodel (3.1.3)
activerecord (3.1.3)
activeresource (3.1.3)
activesupport (3.1.3)
ansi (1.4.3)
arel (2.2.3)
bigdecimal (1.1.0)
builder (3.0.4)
bundler (1.2.4)
coffee-rails (3.1.1)
coffee-script (2.2.0)
coffee-script-source (1.4.0)
erubis (2.7.0)
execjs (1.4.0)
hike (1.2.1)
i18n (0.6.1)
io-console (0.3)
jquery-rails (2.2.1)
json (1.7.7, 1.5.4)
mail (2.3.3)
mime-types (1.21)
minitest (2.5.1)
multi_json (1.6.1)
polyglot (0.3.3)
rack (1.3.10)
rack-cache (1.2)
rack-mount (0.8.3)
rack-ssl (1.3.3)
rack-test (0.6.2)
rails (3.1.3)
railties (3.1.3)
rake (10.0.3, 0.9.2.2)
rdoc (3.12.1, 3.9.5)
rubygems-bundler (1.1.0)
rvm (1.11.3.6)
sass (3.2.5)
sass-rails (3.1.7)
sprockets (2.0.4)
sqlite3 (1.3.7)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.12)
turn (0.8.3)
tzinfo (0.3.35)
uglifier (1.3.0)
4

4 回答 4

4

一些建议:

  1. 更新捆绑器:gem update bundler
  2. 更新红宝石:gem update --system
于 2013-05-23T15:48:08.490 回答
1

我最近遇到了类似的问题,我意识到问题出在.bundle目录中的配置文件中(我从其生产文件夹中下载了项目)。我修复了删除整个.bundle文件夹的问题。

于 2014-03-26T11:04:17.777 回答
0

这对我有用

gem uninstall atomic tzinfo
#select 'All versions' for both
gem install atomic tzinfo
于 2014-11-19T21:05:50.893 回答
0

这是一个明显的(事后看来)问题,但对我来说,我收到这个错误是因为我被拴在手机上,所以我运行了一个名为 TripMode 的程序,它默认阻止大多数网络流量。授予对 Ruby 的网络访问权限允许捆绑程序正确连接。

于 2017-01-13T16:15:46.923 回答