【问题标题】:Heroku Application Error LogsHeroku 应用程序错误日志
【发布时间】:2014-02-26 04:16:24
【问题描述】:

Heroku 应用程序错误 我不明白为什么会发生这种情况。谁能告诉我为什么会发生这种情况...?

应用程序错误

An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details.

日志

2014-02-25T18:00:50.602268+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
    2014-02-25T18:00:50.602268+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/initializable.rb:54:in `run_initializers'
    2014-02-25T18:00:50.602453+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/application.rb:215:in `initialize!'
    2014-02-25T18:00:50.602453+00:00 app[web.1]:    from /app/config.ru:in `<main>'
    2014-02-25T18:00:50.602453+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
    2014-02-25T18:00:50.603265+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/commands/server.rb:75:in `start'
    2014-02-25T18:00:50.603265+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/commands.rb:76:in `block in <top (required)>'
    2014-02-25T18:00:50.603265+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/commands.rb:71:in `tap'
    2014-02-25T18:00:50.603265+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/commands.rb:71:in `<top (required)>'
    2014-02-25T18:00:50.629589+00:00 app[web.1]: => Booting WEBrick
    2014-02-25T18:00:50.629589+00:00 app[web.1]: => Rails 4.0.1 application starting in production on http://0.0.0.0:5185
    2014-02-25T18:00:50.629589+00:00 app[web.1]: => Run `rails server -h` for more startup options
    2014-02-25T18:00:50.629589+00:00 app[web.1]: => Ctrl-C to shutdown server
    2014-02-25T18:00:50.629589+00:00 app[web.1]: Exiting
    2014-02-25T18:00:50.602013+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/application/finisher.rb:56:in `each'
    2014-02-25T18:00:50.602013+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
    2014-02-25T18:00:50.602013+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/initializable.rb:30:in `instance_exec'
    2014-02-25T18:00:50.602268+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/initializable.rb:55:in `block in run_initializers'
    2014-02-25T18:00:50.602013+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/engine.rb:347:in `eager_load!'
    2014-02-25T18:00:50.602453+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
    2014-02-25T18:00:50.602453+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
    2014-02-25T18:00:50.603265+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
    2014-02-25T18:00:50.602453+00:00 app[web.1]:    from /app/config/environment.rb:5:in `<top (required)>'
    2014-02-25T18:00:50.603265+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
    2014-02-25T18:00:50.603448+00:00 app[web.1]:    from bin/rails:4:in `<main>'
    2014-02-25T18:00:50.603265+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/commands/server.rb:48:in `app'
    2014-02-25T18:00:50.603265+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
    2014-02-25T18:00:50.602268+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/initializable.rb:30:in `run'
    2014-02-25T18:00:50.602453+00:00 app[web.1]:    from /app/config.ru:in `new'
    2014-02-25T18:00:50.602453+00:00 app[web.1]:    from /app/config.ru:3:in `block in <main>'
    2014-02-25T18:00:50.602453+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
    2014-02-25T18:00:51.291322+00:00 heroku[web.1]: Process exited with status 1
    2014-02-25T18:00:50.603265+00:00 app[web.1]:    from bin/rails:4:in `require'
    2014-02-25T18:00:50.603265+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
    2014-02-25T18:00:50.602268+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
    2014-02-25T18:00:50.602453+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
    2014-02-25T18:00:51.758808+00:00 heroku[web.1]: State changed from starting to crashed
    2014-02-25T18:00:51.748009+00:00 heroku[web.1]: Process exited with status 1
    2014-02-25T18:00:54.250856+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=calm-badlands-3360.herokuapp.com request_id=84c4a7e9-b3b9-4fac-980a-979ead018666 fwd="90.1.28.3" dyno= connect= service= status=503 bytes=
    2014-02-25T18:00:55.024660+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=calm-badlands-3360.herokuapp.com request_id=f93d18e0-8750-4448-b223-da8b57597c29 fwd="90.1.28.3" dyno= connect= service= status=503 bytes=
    2014-02-25T18:01:47.519017+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=calm-badlands-3360.herokuapp.com request_id=3bd62614-b098-472e-bb9e-886d6da1f7d1 fwd="90.1.28.3" dyno= connect= service= status=503 bytes=
    2014-02-25T18:01:50.506532+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/posts host=calm-badlands-3360.herokuapp.com request_id=6ade44f7-cfdf-4f77-8f7e-4f4ca7a34ab0 fwd="90.1.28.3" dyno= connect= service= status=503
    bytes=
    2014-02-25T18:02:12.017450+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=calm-badlands-3360.herokuapp.com request_id=e34e7e51-3cf5-4f24-a256-3406ee448477 fwd="90.1.28.3" dyno= connect= service= status=503 bytes=
    2014-02-25T18:01:46.882235+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/posts host=calm-badlands-3360.herokuapp.com request_id=84c252b7-d3a0-4db9-ba9b-8d9364a01b36 fwd="90.1.28.3" dyno= connect= service= status=503
    bytes=
    2014-02-25T18:06:45.846671+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=calm-badlands-3360.herokuapp.com request_id=0460b082-c362-4582-bc2f-de0ab4da5969 fwd="90.1.28.3" dyno= connect= service= status=503 bytes=
    2014-02-25T18:06:46.507092+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=calm-badlands-3360.herokuapp.com request_id=8ed0ec0e-ab22-48ca-a984-943cb8daa12a fwd="90.1.28.3" dyno= connect= service= status=503 bytes=
    2014-02-25T18:09:27+00:00 heroku[slug-compiler]: Slug compilation started
    2014-02-25T18:09:53.647138+00:00 heroku[api]: Deploy 16cb85e by cyril.declerck@gmail.com
    2014-02-25T18:09:53.647227+00:00 heroku[api]: Release v7 created by cyril.declerck@gmail.com
    2014-02-25T18:09:53+00:00 heroku[slug-compiler]: Slug compilation finished
    2014-02-25T18:09:55.984536+00:00 heroku[web.1]: State changed from crashed to starting
    2014-02-25T18:09:59.466185+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 34598 -e production`
    2014-02-25T18:10:03.208591+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/engine.rb:462:in `eager_load!'
    2014-02-25T18:10:03.208591+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
    2014-02-25T18:10:03.208796+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/initializable.rb:55:in `block in run_initializers'
    2014-02-25T18:10:03.208591+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/engine.rb:464:in `each'
    2014-02-25T18:10:03.208796+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/initializable.rb:30:in `run'
    2014-02-25T18:10:03.208591+00:00 app[web.1]: /app/app/uploaders/avatar_uploader.rb:3:in `<top (required)>': uninitialized constant CarrierWave (NameError)
    2014-02-25T18:10:03.208591+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/engine.rb:465:in `block (2 levels) in eager_load!'
    2014-02-25T18:10:03.208591+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/engine.rb:464:in `block in eager_load!'
    2014-02-25T18:10:03.208591+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/engine.rb:462:in `each'
    2014-02-25T18:10:03.208796+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
    2014-02-25T18:10:03.209000+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/application.rb:215:in `initialize!'
    2014-02-25T18:10:03.208591+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/application/finisher.rb:56:in `each'
    2014-02-25T18:10:03.209000+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
    2014-02-25T18:10:03.208591+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/engine.rb:347:in `eager_load!'
    2014-02-25T18:10:03.209000+00:00 app[web.1]:    from /app/config.ru:3:in `block in <main>'
    2014-02-25T18:10:03.209000+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/initializable.rb:54:in `run_initializers'
    2014-02-25T18:10:03.209553+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
    2014-02-25T18:10:03.209553+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
    2014-02-25T18:10:03.208796+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:180:in `each'
    2014-02-25T18:10:03.208796+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
    2014-02-25T18:10:03.208796+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
    2014-02-25T18:10:03.208796+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
    2014-02-25T18:10:03.209553+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/commands/server.rb:48:in `app'
    2014-02-25T18:10:03.208591+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/initializable.rb:30:in `instance_exec'
    2014-02-25T18:10:03.209000+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
    2014-02-25T18:10:03.209000+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
    2014-02-25T18:10:03.209553+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
    2014-02-25T18:10:03.209553+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
    2014-02-25T18:10:03.208796+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
    2014-02-25T18:10:03.208796+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
    2014-02-25T18:10:03.209000+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
    2014-02-25T18:10:03.209553+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/commands.rb:76:in `block in <top (required)>'
    2014-02-25T18:10:03.209553+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/commands.rb:71:in `tap'
    2014-02-25T18:10:03.209000+00:00 app[web.1]:    from /app/config.ru:in `<main>'
    2014-02-25T18:10:03.209553+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
    2014-02-25T18:10:03.209729+00:00 app[web.1]:    from bin/rails:4:in `require'
    2014-02-25T18:10:03.209000+00:00 app[web.1]:    from /app/config/environment.rb:5:in `<top (required)>'
    2014-02-25T18:10:03.209553+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/commands.rb:71:in `<top (required)>'
    2014-02-25T18:10:03.209729+00:00 app[web.1]:    from bin/rails:4:in `<main>'
    2014-02-25T18:10:03.209553+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/commands/server.rb:75:in `start'
    2014-02-25T18:10:03.209000+00:00 app[web.1]:    from /app/config.ru:in `new'
    2014-02-25T18:10:03.240675+00:00 app[web.1]: => Booting WEBrick
    2014-02-25T18:10:03.240675+00:00 app[web.1]: => Rails 4.0.1 application starting in production on http://0.0.0.0:34598
    2014-02-25T18:10:03.240675+00:00 app[web.1]: => Run `rails server -h` for more startup options
    2014-02-25T18:10:03.240675+00:00 app[web.1]: => Ctrl-C to shutdown server
    2014-02-25T18:10:03.240675+00:00 app[web.1]: Exiting

【问题讨论】:

  • 似乎其中一个错误与找不到CarrierWave 模块有关。你在你的应用程序中使用CarrierWave 吗?它是否正确包含在您的 Gemfile 中?
  • 不,它不在我的 GemFile 中
  • 你读过错误流吗?找不到CarrierWave。一个疯狂的猜测是您在 Gemfile 中有错字或版本不兼容。仔细检查 Gemfile 中的 CarrierWave 条目,例如正确的大小写和拼写。如果没有CW条目(因为它应该是avatar_uploader或其他的依赖项,那么为当前版本添加一个。删除Gemfile.lock然后给bundle install。最后再次推送到Heroku。
  • 现在是We're sorry, but something went wrong. If you are the application owner check the logs for more information. 我检查了日志,但我不知道谁在看
  • 我发现了这个错误PG::UndefinedTable: ERROR: relation "posts" does not exist

标签: ruby-on-rails ruby heroku


【解决方案1】:

您收到错误消息,因为您的应用程序找不到 CarrierWave 模块。

请确保您的 Gemfile 中包含 CarrierWave

gem 'carrierwave'

更新:

关于 posts 关系的错误,您必须使用以下命令迁移 Heroku 数据库:

heroku run rake db:migrate

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-11-19
    • 2013-05-05
    • 2019-04-16
    • 2021-08-28
    • 1970-01-01
    • 2016-10-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多