【问题标题】:Heroku push failing, perhaps timeout from rubygemsHeroku 推送失败,可能是 ruby​​gems 超时
【发布时间】:2012-01-27 05:25:22
【问题描述】:

我正在尝试使用

推送到heroku
git push heroku master

尝试访问 ruby​​gems 时卡住了:

    -> Heroku receiving push 
-----> Removing .DS_Store files 
-----> Ruby/Rails app detected 
-----> Installing dependencies using Bundler version 1.1.rc.5 
Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ 
Fetching gem metadata from http://rubygems.org/....... 
/app/slug-compiler/lib/utils.rb:62:in `block (2 levels) in spawn': command='/app/slug-compiler/lib/../buildpacks/ruby/bin/compile /tmp/build_38k3w88w3yxzg /app/tmp/repo.git/.cache' exit_status=0 out='' event=timeout elapsed=596.7476198673248 (Utils::TimeoutError) 
from /app/slug-compiler/lib/utils.rb:48:in `loop' 
from /app/slug-compiler/lib/utils.rb:48:in `block in spawn' 
from /app/slug-compiler/lib/utils.rb:44:in `popen' 
from /app/slug-compiler/lib/utils.rb:44:in `spawn' 
from /app/slug-compiler/lib/buildpack.rb:35:in `block in compile' 
from /app/slug-compiler/lib/buildpack.rb:33:in `fork' 
from /app/slug-compiler/lib/buildpack.rb:33:in `compile' 
from /app/slug-compiler/lib/slug.rb:464:in `block in run_buildpack' 
from /app/slug-compiler/lib/utils.rb:117:in `log' 
from /app/slug-compiler/lib/slug.rb:702:in `log' 
from /app/slug-compiler/lib/slug.rb:463:in `run_buildpack' 
from /app/slug-compiler/lib/slug.rb:107:in `block (2 levels) in compile' 
from /app/slug-compiler/lib/utils.rb:98:in `block in timeout' 
from /usr/local/lib/ruby/1.9.1/timeout.rb:58:in `timeout' 
from /app/slug-compiler/lib/utils.rb:98:in `rescue in timeout' 
from /app/slug-compiler/lib/utils.rb:93:in `timeout' 
from /app/slug-compiler/lib/slug.rb:96:in `block in compile' 
from /app/slug-compiler/lib/utils.rb:117:in `log' 
from /app/slug-compiler/lib/slug.rb:702:in `log' 
from /app/slug-compiler/lib/slug.rb:95:in `compile' 
from /app/slug-compiler/bin/slugc:85:in `block in <main>' 
from /app/slug-compiler/lib/slug.rb:472:in `block in lock' 
from /app/slug-compiler/lib/repo_lock.rb:44:in `call' 
from /app/slug-compiler/lib/repo_lock.rb:44:in `run' 
from /app/slug-compiler/lib/slug.rb:472:in `lock' 
from /app/slug-compiler/bin/slugc:66:in `<main>' 
! Heroku push rejected, failed to compile Ruby/rails app

To git@heroku.com:[app].git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to 'git@heroku.com:[app].git'

这是我的宝石文件

    source 'http://rubygems.org'

gem 'rails'


# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3-ruby', :group => :development
gem 'gravatar_image_tag'
gem 'acts_as_follower', "~> 0.1.1"

group :development do
gem 'rspec-rails'
gem 'annotate' 
end

gem 'faker'
gem 'pg' 
gem 'jquery-rails'

gem 'thumbs_up'
gem 'kaminari'

group :test do
gem 'rspec'
gem 'webrat'
gem 'factory_girl_rails'

end

gem 'therubyracer', :platforms => :ruby
gem 'execjs', "~> 1.2.9"

gem 'activeadmin'
gem 'meta_search'
  gem 'sass-rails'
group :assets do

 gem 'coffee-rails'
  gem 'uglifier'
end

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
# gem 'ruby-debug'
# gem 'ruby-debug19', :require => 'ruby-debug'

# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'

# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
#   gem 'webrat'
# end

这从未发生过。 gemfile 中的变化是我添加了acts_as_follower。所有宝石都使用捆绑更新进行更新 我该怎么做才能解决这个问题?

更新: 我还测试了heroku run bundle update,它也停止了......

更新 2: 我现在明白了

>git push heroku master
Enter passphrase for key '/c/Users/Me/.ssh/id_rsa':
Counting objects: 214, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (182/182), done.
Read from remote host heroku.com: Connection reset by peer
fatal: sha1 file '<stdout>' write error: Invalid argument
error: failed to push some refs to 'git@heroku.com:[app].git'

【问题讨论】:

标签: ruby-on-rails-3 rubygems heroku git-push gemfile


【解决方案1】:

现在还在发生吗?看起来问题不是你要解决的,而是 Heroku 的。

您在问题发生时检查了https://status.heroku.com/ 吗?昨天 Heroku 工具出现问题,这可以解释问题。

【讨论】:

  • 谢谢,但截至 5 分钟前,它仍然会发生。我看到了 heroku 状态,它发生在我看到所有系统都运行之后。还有其他人有heroku推送问题吗?
  • 它对你没有帮助,但我刚刚添加了相同的 Gem,捆绑并推送到 Heroku(雪松),它推送到 Heroku 很好。
  • 我想知道,我做了 bundler pack 并将 gem 上传到 heroku 是否重要? (我也不知道怎么不做,bundler install 好像是自动做的)
  • 你需要将 Gemfile 和 Gemfile.lock 都提交到 git 并将它们都推送到 Heroku,它们会在编译你的 slug 时将它们打包。
【解决方案2】:

从 gem 文件中删除 faker gem 然后尝试,它可能会工作......

【讨论】:

    【解决方案3】:

    解决了。

    问题在于活动管理员和 meta_search 见https://github.com/gregbell/active_admin/issues/182

    浪费了几天时间。heroku 支持帮助我解决了这个问题

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-12-30
      • 2013-02-28
      • 2020-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多