【问题标题】:Heroku error - We're sorry, but something went wrongHeroku 错误 - 很抱歉,但出了点问题
【发布时间】:2012-10-11 17:40:32
【问题描述】:

我在 Rails 3.2.7 上运行。我在已部署的应用程序上收到以下消息: 很抱歉,出了点问题。

我真的不知道是什么导致了这个错误。

这是我的 heroku 日志。

2012-10-10T20:24:01+00:00 heroku[web.1]: State changed from starting to up
2012-10-10T21:28:17+00:00 heroku[web.1]: Idling
2012-10-10T21:28:20+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2012-10-10T21:28:21+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/server.rb:90:in `select'
2012-10-10T21:28:21+00:00 app[web.1]: [2012-10-10 21:28:21] ERROR SignalException: SIGTERM
2012-10-10T21:28:31+00:00 heroku[web.1]: Stopping remaining processes with SIGKILL
2012-10-10T21:28:31+00:00 heroku[web.1]: Error R12 (Exit timeout) -> At least one process failed to exit within 10 seconds of SIGTERM
2012-10-10T21:28:33+00:00 heroku[web.1]: Process exited with status 137
2012-10-10T21:28:33+00:00 heroku[web.1]: State changed from up to down
2012-10-11T17:24:11+00:00 heroku[web.1]: Unidling
2012-10-11T17:24:11+00:00 heroku[web.1]: State changed from down to starting
2012-10-11T17:24:26+00:00 heroku[web.1]: State changed from starting to up
2012-10-11T17:24:28+00:00 heroku[router]: GET mighty-earth-4316.herokuapp.com/favicon.ico dyno=web.1 queue=0 wait=0ms service=14ms status=304 bytes=0
pj@ubuntu:~/Documents/demotywatory$ rails -v
Rails 3.2.7

和宝石文件

Gemfile.rb

source 'https://rubygems.org'

gem 'rails', '3.2.7'

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

group :development do
  gem 'sqlite3'
end

group :production do
  gem 'pg'
end



# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby

  gem 'uglifier', '>= 1.0.3'
  gem 'haml'
  gem 'nifty-generators'
  gem 'simple_form'
  gem 'twitter-bootstrap-rails'
  gem "bootstrap-will_paginate"
end

gem 'carrierwave'
gem 'rmagick'

gem 'jquery-rails'
gem 'thumbs_up'
gem 'devise'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
gem 'bcrypt-ruby', '~> 3.0.0'


# To use Jbuilder templates for JSON
# gem 'jbuilder'

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

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'debugger'

gem "mocha", :group => :test

【问题讨论】:

  • 您在什么时候收到此消息?在git push 之后?你可以试试heroku restart 看看会发生什么吗?除此之外,您是否收到任何其他错误?
  • 只是为了仔细检查:你需要运行“heroku rake db:migrate”吗?我通常会忘记这样做。要检查的另一件事是“heroku 运行控制台”,您应该获得更好的堆栈转储来描述错误。
  • 我已经运行 heroku run rake db:migrate
  • 我在 git push 后立即收到此消息。我刚刚尝试了 heroku restart,但它不起作用。
  • 在您的终端中,运行 heroku logs --tail,清除屏幕(命令 K,如果您使用的是 Mac),然后访问您的站点以重现错误。如果新的日志记录不能帮助您发现问题,请将其包含在您问题的更新中。

标签: ruby-on-rails heroku


【解决方案1】:

尝试将 haml 从资产组中删除。在试图找出我的数据库出了什么问题后,从我的 gemfile 中的资产组中取出 haml 为我修复了它。

【讨论】:

    猜你喜欢
    • 2014-01-22
    • 1970-01-01
    • 1970-01-01
    • 2012-07-29
    • 2012-04-19
    • 2012-06-19
    • 1970-01-01
    • 1970-01-01
    • 2012-05-09
    相关资源
    最近更新 更多