Heroku push hanging on “fetching gem metadata from

2019-07-09 03:25发布

My deployment is stuck on fetching gem metadata from rubygems every time I deploy.
It worked this morning, had problems this afternoon and now it's not working again.
We tried from somewhere else and from other computers with the same result.

It works fine locally I can update from rubygems without a problem.

Visual:

Delta compression using up to 4 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 764 bytes, done.
Total 9 (delta 7), reused 0 (delta 0)
-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Using Ruby version: ruby-1.9.3
-----> Installing dependencies using Bundler version 1.2.1
Running: bundle install --without development:test --path vendor/bundle --binstubs bin/
Updating https://github.com/epetre/negative-captcha.git
Fetching gem metadata from http://rubygems.org/.......
Fetching gem metadata from http://rubygems.org/..

[IT HANGS HERE FOREVER]

Anyone has a clue?

3条回答
虎瘦雄心在
2楼-- · 2019-07-09 03:58

Fixed by adding bundler to the gem file and forcing a version

gem 'bundler', '1.2.1'
查看更多
地球回转人心会变
3楼-- · 2019-07-09 04:03

Ok, fixed for good I think. Turns out it only works when explicitly specifying the last versions of heroku and bundler. The strange thing is that it can bundle without the explicit versions locally but not when deploying to heroku.

gem 'heroku', '2.33.0'
gem 'bundler', '1.2.1'
查看更多
不美不萌又怎样
4楼-- · 2019-07-09 04:14

For me changing the protocol to fetch gem fixed the problem.

I changed https://github.com/epetre/negative-captcha.git to git://github.com/epetre/negative-captcha.git in gem file. Bundled it and pushed to heroku and it works.

查看更多
登录 后发表回答