奇妙バンドラエラー:tar_input.rb:49:「初期化 `で:gzip形式でない(のZlib ::のGzipFile ::エラー)のバンドルパックに
-
21-09-2019 - |
質問
実行しているとき、私は奇妙なバンドラエラーを取得しています。
bundle pack
バンドラ0.9.12 と
任意のアイデア?
:( http://pastie.org/881328 の良好フォーマットコードのpastieを参照されたいです)/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
解決 2
自分の質問に答えるために
修正は
からすべての内容を削除することでしたvendor/cache
それが働いたことを後に。
はっきりバンドラバグます。
他のヒント
私は、バンドルupate(バンドラは1.0)と同様の問題を抱えていました。 私は自分のアプリケーションのためのgemsetとRVMを使用しています。
ソリューションを削除することでした。
~/.rvm/gems/ree-1.8.7-2010.02@gemset-name/cache
は伝えられるところでは、オリジナルの問題はバンドラーの1.0.xので固定されているが、私はまだ(1.0.3を使用して)同じエラーメッセージを持っていました。私はここで他の回答に概説され、RVMディレクトリに含め、すべてのcache
フォルダを削除 - 。いいえサイコロ
これは、バンドラーは、あなたの源の一つ($ gem sources
によって返された、すなわち、それらを)解決できない場合は、のものこのエラーを取得しますが判明します。あなたが複数のソースをリストする場合であっても、それはそれらのすべてをpingし、のいずれかののソースが悪い場合、それはこの目立た'initialize': not in gzip format
エラーでクラッシュします。
としては、にその缶をこのチケットを説明しましたなぜならアクセスできないVPMまたはローカルネットワークソースのようなものであることが、私は実際に起因する私の会社のファイアウォールのブロッキングrubygems.orgに問題に遭遇します。
同じように、この答えを提出するの他のこのあいまいなエラーメッセージをクリアするために可能な解決策ます。
ちょうどバンドラー0.9.26とrails3 beta4で私に起こりました。打ち上げ
bundle package
今では動作します。しかし、私は、ベンダー/キャッシュの問題が持続を削除する場合。
持っていた同じ事、削除/ bundler_gems /キャッシュ
私はバンドラー1.0.0を実行しているにもかかわらず、私はまだ、このエラーをヒット。 bundle install
は仕事しませんでしたが、実行中のbundle package
がやっています。
rm -rf vendor/cache
bundle package
bundle install
bundle lock
これは少し迷惑なんだ...私は知らない私が行うことができない理由bundle install --relock
あなたはバンドラーのrequire 'bundler/capistrano'
でカピストラーノを使用している場合は、キャッシュディレクトリがshared/bundle/ruby/1.8/cache
である。
私はバンドラーの1.0.xのにアップグレードしたときに、このエラーのすべての痕跡が去っていきました。
私は、アーカイブされた宝石のファイルを削除して、レール3.1のアプリでこの問題を解決してきました
$ bundle -v
Bundler version 1.0.17
$ rm -f vendor/bundle/ruby/1.8/cache/*.gem
私が展開する際に、この問題に遭遇したが、gitのからvendor/cache
を削除したくありませんでした。
はその代わりに、私はこれをやってしまいました
# 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'
このエラーは、単にアップ作物たびます:
cap deploy NO_GEM_CACHE=1