2010-03-22 9 views
19

que estoy recibiendo un error de bundler extraña cuando se ejecutaextraño error bundler: tar_input.rb: 49: en `inicializar ': no ​​en formato gzip (Zlib :: :: GzipFile error) en el paquete paquete

bundle pack 

con bundler 0.9.12

¿Alguna idea? (Ver pastie un código mejor formato: 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 
+0

sucede también a mí, y es difícil de alcanzar en mi caso, repetidas carreras pueden iniciar la aplicación con éxito – dolzenko

Respuesta

14

para responder a mi propia pregunta:

la solución era eliminar todo el contenido de

vendor/cache 

después de que haya funcionado.

claramente un error de bundler.

2

tenía la misma cosa, eliminado/bundler_gems/cache

4

me acaba de suceder con bundler 0.9.26 y beta4 rails3. lanzó

bundle package 

ahora funciona. pero si elimino proveedor/caché, el problema persiste.

+0

Esto funcionó para mí, la misma configuración. – edude05

+0

Esto funcionó para mí también. ¡Accesorios! – mmay

1

rm -rf vendor/cache

bundle package

bundle install

bundle lock

Es un poco molesto ... no sé por qué no puedo hacer bundle install --relock

21

que estaba teniendo problema similar con paquete upate (bundler 1.0). Estoy usando rvm con gemset para mi aplicación.

solución era quitar:

~/.rvm/gems/[email protected]/cache

+0

Esto funcionó para mí. – Avdi

+0

Uf, no funcionó para mí. Realmente estaba esperando que lo hiciera. Todavía investigando aquí ... – Judy

+0

Esto funcionó para mí. Vale la pena señalar que después de hacer esto, tuve que ejecutar la instalación del paquete en todas mis aplicaciones y gemas usando bundler. – jbgo

1

Si está utilizando con Capistrano, el directorio de caché Bündler de require 'bundler/capistrano' está en shared/bundle/ruby/1.8/cache.

0

Todos los rastros de este error desaparecieron cuando actualicé a Bundler 1.0.x.

2

Aunque ejecuto Bundler 1.0.0, sigo teniendo este error. bundle install no funcionó, pero al ejecutar bundle package sí.

+0

ídem. eliminar el caché no tuvo ningún efecto, pero el paquete lo resolvió –

7

Supuestamente, el problema original se corrigió con Bundler 1.0.x, pero todavía tenía el mismo mensaje de error (con 1.0.3). Eliminé todas las carpetas cache, incluso en los directorios de RVM, como se indica en las otras respuestas aquí, no hay dados.

Resulta también podrás obtiene este error si Bündler no puede resolver una de sus fuentes (es decir, los devueltos por $ gem sources).Incluso si enumera varias fuentes, hará ping a todas ellas, y si cualquier fuente es incorrecta, se bloqueará con este error 'initialize': not in gzip format no descripto.

Como se describe en this ticket, puede deberse a algo como un VPM o fuente de red local inaccesible, pero en realidad me encontré con el problema debido al bloqueo de firewall de mi empresa rubygems.org.

Simplemente enviando esta respuesta como otra posible solución para borrar este vago mensaje de error.

+0

Gracias, eso resolvió mi problema. –

0

He resuelto este problema en una aplicación carriles de 3,1 mediante la supresión de los ficheros archivados joya:

$ bundle -v 
Bundler version 1.0.17 
$ rm -f vendor/bundle/ruby/1.8/cache/*.gem 
0

me encontré con este problema al desplegar, pero no quería quitar vendor/cache de git.

En cambio, terminé haciendo esto:

# deploy.rb 
namespace :bundle do 
    desc "Removes vendor/cache when NO_GEM_CACHE=1 is set. Resolves Zlib::GzipFile::Error (not in gzip format)." 
    task :remove_cache do 
    run "rm -fr #{release_path}/vendor/cache" if ENV['NO_GEM_CACHE'] == '1' 
    end 
end 
before :'bundle:install', :'bundle:remove_cache' 

Siempre que surge este error hasta simplemente:

cap deploy NO_GEM_CACHE=1 
Cuestiones relacionadas