簡體   English   中英

Bundler錯誤:重試git cat-file…如果此錯誤仍然存​​在,則可以嘗試刪除緩存目錄

[英]Bundler error: Retrying git cat-file … If this error persists you could try removing the cache directory

我沒有捆綁更新zipcar,這是一個本地的寶石,並得到:

$ bundle update zipcar
Retrying git cat-file -e 78c5245dd174058958a07d6674de7bc037e14ed5 due to error (2/3): Bundler::Source::Git::GitCommandError Git
 error: command `git cat-file -e 78c5245dd174058958a07d6674de7bc037e14ed5` in directory /Users/mdurrant/.rvm/gems/jruby-1.7.4/c
ache/bundler/git/tricorder-4921ab3158ace9efb6d757333e208c58cbfe3e2e has failed.
If this error persists you could try removing the cache directory '/Users/mdurrant/.rvm/gems/jruby-1.7.4/cache/bundler/git/tric
order-4921ab3158ace9efb6d757333e208c58cbfe3e2e'
Retrying git cat-file -e 78c5245dd174058958a07d6674de7bc037e14ed5 due to error (3/3): Bundler::Source::Git::GitCommandError Git
 error: command `git cat-file -e 78c5245dd174058958a07d6674de7bc037e14ed5` in directory /Users/mdurrant/.rvm/gems/jruby-1.7.4/c
ache/bundler/git/tricorder-4921ab3158ace9efb6d757333e208c58cbfe3e2e has failed.
If this error persists you could try removing the cache directory '/Users/mdurrant/.rvm/gems/jruby-1.7.4/cache/bundler/git/tric
order-4921ab3158ace9efb6d757333e208c58cbfe3e2e'

這是由於捆綁器具有檢測網絡故障的功能。

對我來說,簡單的解決方法是再次運行它。

如果您根據gem代碼進行了重新設置,那么您也會遇到類似的錯誤。 例如,如果您的Gemfile有這樣的Gemfile

gem 'mygemname', :git => 'https://github.com/foo/mygemname.git'

它將這樣的東西放在您的Gemfile.lock

GIT
  remote: https://github.com/foo/mygemname.git
  revision: aaabbbbbbbbbbbcccccccccccdddddxxxxxxxxxxxx

您將在Heroku日志中看到的錯誤類似於:

Retrying git cat-file -e aaabbbbbbbbbbbcccccccccccdddddxxxxxxxxxxxx due 
to error (2/3): Bundler::Source::Git::GitCommandError Git error: 
command `git cat-file -e aaabbbbbbbbbbbcccccccccccdddddxxxxxxxxxxxx` 
in directory /tmp/build_...

這是因為git哈希值在重新設置期間發生了變化。 解決方案是從Gemfile刪除gem,運行bundle install ,然后再次將其重新添加(它將使用新的git hash)。

我有非常相似的問題。 當我刪除gemfile.lock並再次運行bundle install時,它解決了。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM