推送到Heroku时超时

时间:2012-07-19 12:03:49

标签: git compiler-construction heroku timeout push

嗨我在推送到heroku时遇到编译器超时....我真的不明白为什么,因为我的宝石没有变化,之前已成功推送到heroku ....

这是日志:

-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Using Ruby version: ruby-1.9.3
-----> Installing dependencies using Bundler version 1.2.0.pre
       Running: bundle install --without development:test --path vendor/bundle --binstubs bin/
       Fetching gem metadata from https://rubygems.org/........
/app/slug-compiler/lib/utils.rb:65:in `block (2 levels) in spawn': command='/app/slug-compiler/lib/../buildpacks/ruby/bin/compile /tmp
/build_2z19s0hxp0vh2 /app/tmp/repo.git/.cache' exit_status=0 out='' at=timeout elapsed=578.1850752830505 (Utils::TimeoutError)
        from /app/slug-compiler/lib/utils.rb:51:in `loop'
        from /app/slug-compiler/lib/utils.rb:51:in `block in spawn'
        from /app/slug-compiler/lib/utils.rb:47:in `popen'
        from /app/slug-compiler/lib/utils.rb:47:in `spawn'
        from /app/slug-compiler/lib/buildpack.rb:38:in `block in compile'
        from /app/slug-compiler/lib/buildpack.rb:36:in `fork'
        from /app/slug-compiler/lib/buildpack.rb:36:in `compile'
        from /app/slug-compiler/lib/slug.rb:451:in `block in run_buildpack'
        from /app/slug-compiler/lib/utils.rb:120:in `log'
        from /app/slug-compiler/lib/slug.rb:689:in `log'
        from /app/slug-compiler/lib/slug.rb:450:in `run_buildpack'
        from /app/slug-compiler/lib/slug.rb:110:in `block (2 levels) in compile'
        from /app/slug-compiler/lib/utils.rb:101:in `block in timeout'
        from /usr/local/lib/ruby/1.9.1/timeout.rb:58:in `timeout'
        from /app/slug-compiler/lib/utils.rb:101:in `rescue in timeout'
        from /app/slug-compiler/lib/utils.rb:96:in `timeout'
        from /app/slug-compiler/lib/slug.rb:99:in `block in compile'
        from /app/slug-compiler/lib/utils.rb:120:in `log'
        from /app/slug-compiler/lib/slug.rb:689:in `log'
        from /app/slug-compiler/lib/slug.rb:98:in `compile'
        from /app/slug-compiler/bin/slugc:85:in `block in <main>'
        from /app/slug-compiler/lib/slug.rb:459: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:459:in `lock'
        from /app/slug-compiler/bin/slugc:66:in `<main>'
 !     Heroku push rejected, failed to compile Ruby/rails app

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

这似乎与我的gems文件有些相关,因为如果我运行heroku run bundle update它也会停止

我的宝石文件     来源'https://rubygems.org'

ruby '1.9.3'
gem 'rails', '3.2.5'
gem 'heroku', '~> 2.26.6'
gem "paperclip", " ~> 3.0"

gem 'jquery-rails', '2.0.1'
gem 'bootstrap-sass', '2.0.0'
gem 'bcrypt-ruby', '3.0.1'
gem 'faker', '1.0.1'
gem 'will_paginate', '3.0.3'
gem 'bootstrap-will_paginate', '0.0.6'
gem 'prototype-rails'

group :development, :test do
  gem 'sqlite3', '1.3.5'
  gem 'rspec-rails', '2.10.0'
  gem 'guard-rspec', '0.5.5'
end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '3.2.5'
  gem 'coffee-rails', '3.2.2'
  gem 'uglifier', '1.2.4'
end

group :test do
  gem 'capybara', '1.1.2'
  gem 'factory_girl_rails', '1.4.0'
  gem 'cucumber-rails', '1.2.1', :require => false
  gem 'database_cleaner', '0.7.0'
  gem 'guard-spork', '0.3.2'  
  gem 'spork', '0.9.0'
  gem 'launchy', '2.1.0'
  # gem 'rb-fsevent', '0.9.1', :require => false
  # gem 'growl', '1.0.3'
end

group :production do
  gem 'pg'
  gem 'thin'
end

这里有一篇非常类似的帖子:Heroku push failing, perhaps timeout from rubygems,它指向一个宝石......但它并没有说明我们如何才能找到破碎的宝石......有什么想法吗?

修改

这似乎是pg Gem的一个问题。我通过逐个评论我的非静态(没有指定版本)来发现它。如果我不包括pg gem,则推送完成。

我应该使用命令

检查我以前的gems版本
heroku run gem query --local > heroku_gems.txt

但是因为我现在没有注定要手工找到破解版本:-S

编辑2

我尝试安装一些以前版本的pg,比如版本0.12.2,但仍然无法正常工作......

1 个答案:

答案 0 :(得分:1)

经过一整天,并注意到Heroku服务器存在一些SSL问题,我注意到我的production.rb文件中有配置config.force_ssl = true

所以我只是尝试了,然后把config.force_ssl = false和瞧瞧,我又恢复了生机!

好吧,之后我再次将它变为现实,仍然设法再次发布......

猜猜这是一个heroku的事情