a fatal error has occurred. Please see the Bundler troubleshooting documentation at http://bit.ly/bundler-issues

StackOverflow https://stackoverflow.com/questions/16169350

Question

When I'm doing bundle install, I got the exception below. What is this?

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>'

* LOCAL GEMS *

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)
Was it helpful?

Solution

Some suggestions:

  1. update bundler: gem update bundler
  2. update rubygems: gem update --system

OTHER TIPS

I ran into a similar problem recently, and I realised that the problem was in the configuration file in the .bundle directory (I downloaded the project from its production folder). I fixed the problem deleting the entire .bundle folder.

this worked for me

gem uninstall atomic tzinfo
#select 'All versions' for both
gem install atomic tzinfo

This is an obvious (in hindsight) problem, but for me, I got this error because I was tethered to my phone, so I was running a program called TripMode which blocks most network traffic by default. Granting network access to Ruby allowed bundler to connect properly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top