2

I am currently trying to use a custom/private gem that is hosted on GitHub in my Heroku app however whenever I try to push to Heroku it hangs when it is Bundling the gem.

To get the private gem working I have been using this method and created a token for accessing the repository.

All works extremely well locally and my bundle commands works a charm however the minute I push to Heroku, it will hang when it gets to fetching the custom gem. Here is the output (censored for sensitive info):

Counting objects: 26, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (19/19), done.
Writing objects: 100% (19/19), 2.49 KiB, done.
Total 19 (delta 13), reused 0 (delta 0)
-----> Ruby/Rails app detected
-----> Using Ruby version: ruby-1.9.3
-----> Installing dependencies using Bundler version 1.3.0.pre.5
       Running: bundle install --without development:test --path vendor/bundle --binstubs     vendor/bundle/bin --deployment
       Fetching gem metadata from https://rubygems.org/.......
       Fetching gem metadata from https://rubygems.org/..
       Updating git://github.com/rails/rails.git
       Fetching https://<token>@github.com/<username>/<repo>.git

       <hangs here with Heroku timeout error>

It seems I am having similar problems to this question and this question however I have tried both of the solutions proposed on those questions to no avail.

I am using edge-rails so I thought that the use of bundler 1.3.0.pre.5 might be the problem as locally I am using 1.2.3. Would forcing a bundler version on Heroku possibly work? Also I am not sure why there are two Fetching gem metadata from https://rubygems.org/.. lines either...

Thanks a million for your help, been pulling my hair out at this.

Community
  • 1
  • 1
infinityrobot
  • 245
  • 2
  • 9

1 Answers1

3

So the problem ended up being that the version of git Heroku uses doesn't support using tokens yet! Once I included a username/password in my Gemfile (not happy about that but I have set up a special collaborator account so the security risk is narrowed somewhat...) it worked perfectly!

A special thanks to this question that I found that helped me out :)

Community
  • 1
  • 1
infinityrobot
  • 245
  • 2
  • 9