views:

1428

answers:

9

i am getting a strange bundler error when running

bundle pack

with bundler 0.9.12

any ideas? (see pastie for a better formatted code: http://pastie.org/881328 )

/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:49:in `initialize': not in gzip format (Zlib::GzipFile::Error)
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:49:in `new'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:49:in `initialize'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:63:in `each'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:54:in `loop'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:54:in `each'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:32:in `initialize'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:17:in `new'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:17:in `open'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/package.rb:55:in `open'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/format.rb:63:in `from_io'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/format.rb:51:in `from_file_by_path'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/format.rb:50:in `open'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/format.rb:50:in `from_file_by_path'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/source.rb:115:in `specs'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/source.rb:114:in `each'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/source.rb:114:in `specs'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/index.rb:32:in `from_cached_specs'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/index.rb:23:in `application_cached_gems'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/index.rb:15:in `cached_gems'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/index.rb:5:in `build'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/index.rb:14:in `cached_gems'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/environment.rb:15:in `index'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/index.rb:5:in `build'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/environment.rb:13:in `index'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/runtime.rb:86:in `specs'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/runtime.rb:130:in `details'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/runtime.rb:119:in `write_yml_lock'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/runtime.rb:65:in `lock'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/cli.rb:89:in `lock'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/cli.rb:131:in `package'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/vendor/thor/task.rb:33:in `send'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/vendor/thor/task.rb:33:in `run'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/vendor/thor/invocation.rb:109
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/vendor/thor/invocation.rb:116:in `call'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/vendor/thor/invocation.rb:116:in `invoke'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/vendor/thor.rb:137:in `start'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/vendor/thor/base.rb:378:in `start'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/vendor/thor.rb:124:in `start'
  from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/bin/bundle:11
  from /opt/REE/bin/bundle:19:in `load'
  from /opt/REE/bin/bundle:19
+6  A: 

to answer my own question:

the fix was to delete all the contents from

vendor/cache

after that it worked.

clearly a bundler bug.

z3cko
+1  A: 

Had the same thing, removed /bundler_gems/cache

Jim Soho
A: 

same thing. same fix.

Mike Bailey
+2  A: 

just happened to me with bundler 0.9.26 and rails3 beta4. launched

bundle package

now it works. but if I remove vendor/cache the problem persists.

apeacox
This worked for me, same setup.
edude05
+1  A: 

rm -rf vendor/cache

bundle package

bundle install

bundle lock

It's a bit annoying... I don't know why I can't do bundle install --relock

Aaron Gibralter
+8  A: 

I was having similar problem with bundle upate (bundler 1.0). I am using rvm with gemset for my application.

Solution was to remove:

~/.rvm/gems/ree-1.8.7-2010.02@gemset-name/cache

This worked for me.
Avdi
A: 

If you're using Capistrano with Bundler's require 'bundler/capistrano', the cache directory is at shared/bundle/ruby/1.8/cache.

Jason Weathered
A: 

All traces of this error went away when I upgraded to Bundler 1.0.x.

Aaron Gibralter
+1  A: 

Even though I'm running Bundler 1.0.0, I still hit this error. bundle install didn't work, but running bundle package did.

shedd
ditto. removing cache had no effect but package resolved it
Steven Soroka