【问题标题】:Timeout on Heroku push with a custom/private gem使用自定义/私有 gem 的 Heroku 推送超时
【发布时间】:2013-01-25 23:23:29
【问题描述】:

我目前正在尝试在我的 Heroku 应用程序中使用托管在 GitHub 上的自定义/私有 gem,但是每当我尝试推送到 Heroku 时,它在捆绑 gem 时会挂起。

为了让私有 gem 工作,我一直在使用 this method 并创建了一个用于访问存储库的令牌。

所有在本地运行得非常好,我的bundle 命令很有效,但是当我推送到 Heroku 时,它会在获取自定义 gem 时挂起。这是输出(敏感信息被审查):

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>

我似乎遇到了与this questionthis question 类似的问题,但是我尝试了针对这些问题提出的两种解决方案均无济于事。

我正在使用edge-rails,所以我认为使用bundler 1.3.0.pre.5 可能是问题,因为我在本地使用1.2.3。在 Heroku 上强制使用 bundler 版本可能有效吗?我也不确定为什么有两条Fetching gem metadata from https://rubygems.org/.. 行...

感谢一百万的帮助,我一直在努力解决这个问题。

【问题讨论】:

    标签: ruby-on-rails heroku timeout bundler


    【解决方案1】:

    所以问题最终是git Heroku 使用的版本还不支持使用令牌!一旦我在我的 Gemfile 中包含了用户名/密码(对此我并不满意,但我已经设置了一个特殊的合作者帐户,因此安全风险有所缩小......)它完美地工作了!

    特别感谢this question,我发现它帮助了我:)

    【讨论】:

      猜你喜欢
      • 2011-11-16
      • 2023-04-03
      • 2012-07-18
      • 2015-06-24
      • 1970-01-01
      • 2018-05-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多