[英]Bundler error: Retrying git cat-file … If this error persists you could try removing the cache directory
I did bundle update zipcar which is a local gem and got: 我没有捆绑更新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'
It was due to a feature of bundler detecting a network glitch. 这是由于捆绑器具有检测网络故障的功能。
The simple fix for me was to just run it again. 对我来说,简单的解决方法是再次运行它。
You can also get a similar error if you did a rebase on gem code. 如果您根据gem代码进行了重新设置,那么您也会遇到类似的错误。 For example, if you have something like this in your
Gemfile
: 例如,如果您的
Gemfile
有这样的Gemfile
:
gem 'mygemname', :git => 'https://github.com/foo/mygemname.git'
It puts something like this in your Gemfile.lock
: 它将这样的东西放在您的
Gemfile.lock
:
GIT
remote: https://github.com/foo/mygemname.git
revision: aaabbbbbbbbbbbcccccccccccdddddxxxxxxxxxxxx
The error you'll see in the Heroku logs looks something like: 您将在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_...
This is because the git hash changed during the rebase. 这是因为git哈希值在重新设置期间发生了变化。 The solution is to remove the gem from your
Gemfile
, run bundle install
, and then add it back again (which will use the new git hash). 解决方案是从
Gemfile
删除gem,运行bundle install
,然后再次将其重新添加(它将使用新的git hash)。
I had the very similar problem. 我有非常相似的问题。 It resolved when I delete
gemfile.lock
and run bundle install
again. 当我删除
gemfile.lock
并再次运行bundle install
时,它解决了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.