【问题标题】:Heroku App - Check logsHeroku 应用程序 - 检查日志
【发布时间】:2014-04-20 13:18:56
【问题描述】:

在 Posts/1 中的应用程序的某些部分或创建的某些帖子中,我的 heroku 应用程序有问题:

We're sorry, but something went wrong. If you are the application owner check the logs for more information.

这是我的应用链接:forum-epic.herokuapp.com

我在终端中执行:$ heroku logs:

2014-03-15T01:59:40.967235+00:00 app[web.1]: 2014-03-15T01:59:40.966710+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in call' 2014-03-15T01:59:40.966710+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:inblock in start_thread' 2014-03-15T01:59:40.967235+00:00 app[web.1]: 2014-03-15T01:59:41.968384+00:00 heroku[router]: at=info method=GET path=/posts/new host=forum-epic.herokuapp.com request_id=4b173bf1-6156-43f9-ab71-b2fbb7396e03 fwd="187.253.215.208" dyno=web.1 connect=3ms service=10ms status=304 bytes=805 2014-03-15T01:59:42.148134+00:00 heroku[router]: at=info method=GET path=/assets/application-d0b54dd563966c42aad5fd85b1c1f713.css host=forum-epic.herokuapp.com request_id=ecd6b6b4-2901-44c2-8e9e-c65e860a4a78 fwd="187.253.215.208" dyno=web.1 connect=1ms service=6ms status=404 bytes=1616 2014-03-15T01:59:42.162296+00:00 heroku[router]: at=info method=GET path=/assets/application-f472f62f2e8bac4049be455c1a6b8f1d.js host=forum-epic.herokuapp.com request_id=a971770a-7395-47ca-a21e-44a67ee4166c fwd="187.253.215.208" dyno=web.1 connect=3ms service=6ms status=404 bytes=1616 2014-03-15T02:00:00.489023+00:00 heroku[router]: at=info method=POST path=/posts host=forum-epic.herokuapp.com request_id=c340ccda-0237-43ea-82c9-3ae99787a54b fwd="187.253.215.208" dyno=web.1 connect=1ms service=44ms status=401 bytes=909 2014-03-15T02:00:00.577027+00:00 app[web.1]: I, [2014-03-15T01:59:40.967633 #2] INFO -- : Started GET "/assets/application-f472f62f2e8bac4049be455c1a6b8f1d.js" for 187.253.215.208 at 2014-03-15 01:59:40 +0000 2014-03-15T02:00:00.577027+00:00 app[web.1]: F, [2014-03-15T01:59:40.969043 #2] FATAL -- : 2014-03-15T02:00:00.577027+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/middleware/debug_exceptions.rb:21:in call' 2014-03-15T02:00:00.577027+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/middleware/show_exceptions.rb:30:incall' 2014-03-15T02:00:00.577027+00:00 app[web.1]: ActionController::RoutingError (No route matches [GET] "/assets/application-f472f62f2e8bac4049be455c1a6b8f1d.js"): 2014-03-15T02:00:00.577027+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/rack/logger.rb:20:in block in call' 2014-03-15T02:00:00.577027+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/tagged_logging.rb:67:intagged' 2014-03-15T02:00:00.577249+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/middleware/request_id.rb:21:in call' 2014-03-15T02:00:00.577027+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/tagged_logging.rb:25:intagged' 2014-03-15T02:00:00.577249+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/rack/logger.rb:20:in call' 2014-03-15T02:00:00.577249+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:incall' 2014-03-15T02:00:00.577249+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in call' 2014-03-15T02:00:00.577419+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:inservice' 2014-03-15T02:00:00.577419+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in run' 2014-03-15T02:00:00.577027+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/rack/logger.rb:38:incall_app' 2014-03-15T02:00:00.577027+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/tagged_logging.rb:67:in block in tagged' 2014-03-15T02:00:00.577249+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:511:incall' 2014-03-15T02:00:00.577249+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in call' 2014-03-15T02:00:00.577249+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:incall' 2014-03-15T02:00:00.577249+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:97:in call' 2014-03-15T02:00:00.577419+00:00 app[web.1]: 2014-03-15T02:00:00.577419+00:00 app[web.1]: I, [2014-03-15T01:59:41.959347 #2] INFO -- : Rendered posts/new.html.erb within layouts/application (2.0ms) 2014-03-15T02:00:00.577419+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:inblock in start_thread' 2014-03-15T02:00:00.577419+00:00 app[web.1]: I, [2014-03-15T01:59:41.955034 #2] INFO -- : Started GET "/posts/new" for 187.253.215.208 at 2014-03-15 01:59:41 +0000 2014-03-15T02:00:00.577419+00:00 app[web.1]: I, [2014-03-15T01:59:41.956171 #2] INFO -- : Processing by PostsController#new as HTML 2014-03-15T02:00:00.577249+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/cache/strategy/local_cache.rb:83:in call' 2014-03-15T02:00:00.577884+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/middleware/debug_exceptions.rb:21:incall' 2014-03-15T02:00:00.577884+00:00 app[web.1]: ActionController::RoutingError (No route matches [GET] "/assets/application-d0b54dd563966c42aad5fd85b1c1f713.css"): 2014-03-15T02:00:00.577884+00:00 app[web.1]: F, [2014-03-15T01:59:42.139182 #2] FATAL -- : 2014-03-15T02:00:00.577884+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/rack/logger.rb:20:in block in call' 2014-03-15T02:00:00.577884+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/tagged_logging.rb:67:inblock in tagged' 2014-03-15T02:00:00.577419+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in service' 2014-03-15T02:00:00.577249+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:incall' 2014-03-15T02:00:00.577884+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/tagged_logging.rb:67:in tagged' 2014-03-15T02:00:00.577884+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/rack/logger.rb:38:incall_app' 2014-03-15T02:00:00.577884+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/tagged_logging.rb:25:in tagged' 2014-03-15T02:00:00.578079+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:112:incall' 2014-03-15T02:00:00.578079+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:511:in call' 2014-03-15T02:00:00.578079+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:incall' 2014-03-15T02:00:00.578079+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:97:in call' 2014-03-15T02:00:00.578410+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:inservice' 2014-03-15T02:00:00.578410+00:00 app[web.1]: 2014-03-15T02:00:00.578410+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/middleware/debug_exceptions.rb:21:in call' 2014-03-15T02:00:00.578583+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/rack/logger.rb:38:incall_app' 2014-03-15T02:00:00.578079+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:in call' 2014-03-15T02:00:00.578583+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/rack/logger.rb:20:inblock in call' 2014-03-15T02:00:00.578079+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in call' 2014-03-15T02:00:00.578583+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/tagged_logging.rb:25:intagged' 2014-03-15T02:00:00.578410+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in service' 2014-03-15T02:00:00.577419+00:00 app[web.1]: I, [2014-03-15T01:59:41.960067 #2] INFO -- : Completed 200 OK in 4ms (Views: 3.0ms | ActiveRecord: 0.0ms) 2014-03-15T02:00:00.578583+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:incall' 2014-03-15T02:00:00.578900+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in call' 2014-03-15T02:00:00.578410+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:inblock in start_thread' 2014-03-15T02:00:00.578410+00:00 app[web.1]: I, [2014-03-15T01:59:42.152295 #2] INFO -- : Started GET "/assets/application-f472f62f2e8bac4049be455c1a6b8f1d.js" for 187.253.215.208 at 2014-03-15 01:59:42 +0000 2014-03-15T02:00:00.578410+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in run' 2014-03-15T02:00:00.578900+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:511:incall' 2014-03-15T02:00:00.578900+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:97:in call' 2014-03-15T02:00:00.578900+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lock.rb:17:incall' 2014-03-15T02:00:00.578900+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in block in start_thread' 2014-03-15T02:00:00.579068+00:00 app[web.1]: I, [2014-03-15T02:00:00.449231 #2] INFO -- : Started POST "/posts" for 187.253.215.208 at 2014-03-15 02:00:00 +0000 2014-03-15T02:00:00.579068+00:00 app[web.1]: 2014-03-15T02:00:00.577419+00:00 app[web.1]: 2014-03-15T02:00:00.578410+00:00 app[web.1]: ActionController::RoutingError (No route matches [GET] "/assets/application-f472f62f2e8bac4049be455c1a6b8f1d.js"): 2014-03-15T02:00:00.578900+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/cache/strategy/local_cache.rb:83:incall' 2014-03-15T02:00:00.579068+00:00 app[web.1]: I, [2014-03-15T02:00:00.483839 #2] INFO -- : Processing by PostsController#create as HTML 2014-03-15T02:00:00.579068+00:00 app[web.1]: I, [2014-03-15T02:00:00.484007 #2] INFO -- : Parameters: {"utf8"=>"✓", "authenticity_token"=>"BsOc6lEqHf56jK80dlHPPJbUyxdTdZ4OjMhTn4QViX0=", "post"=>{"title"=>"Test - Primer Post", "text"=>"Test - Primer Text"}, "commit"=>"Save Post"} 2014-03-15T02:00:00.578583+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/tagged_logging.rb:67:in block in tagged' 2014-03-15T02:00:00.579068+00:00 app[web.1]: I, [2014-03-15T02:00:00.575765 #2] INFO -- : Started POST "/posts" for 187.253.215.208 at 2014-03-15 02:00:00 +0000 2014-03-15T02:00:00.578079+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/rack/logger.rb:20:incall' 2014-03-15T02:00:00.577884+00:00 app[web.1]: I, [2014-03-15T01:59:42.138231 #2] INFO -- : Started GET "/assets/application-d0b54dd563966c42aad5fd85b1c1f713.css" for 187.253.215.208 at 2014-03-15 01:59:42 +0000 2014-03-15T02:00:00.578079+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in call' 2014-03-15T02:00:00.579068+00:00 app[web.1]: I, [2014-03-15T02:00:00.576886 #2] INFO -- : Parameters: {"utf8"=>"✓", "authenticity_token"=>"BsOc6lEqHf56jK80dlHPPJbUyxdTdZ4OjMhTn4QViX0=", "post"=>{"title"=>"Test - Primer Post", "text"=>"Test - Primer Text"}, "commit"=>"Save Post"} 2014-03-15T02:00:00.578900+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:inrun' 2014-03-15T02:00:00.578410+00:00 app[web.1]: F, [2014-03-15T01:59:42.153295 #2] FATAL -- : 2014-03-15T02:00:00.577884+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/middleware/show_exceptions.rb:30:in call' 2014-03-15T02:00:00.578583+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/middleware/show_exceptions.rb:30:incall' 2014-03-15T02:00:00.578583+00:00 app[web.1]: vendor/bundle/ruby/2.0.0 /gems/activesupport-4.0.2/lib/active_support/tagged_logging.rb:67:in tagged' 2014-03-15T02:00:00.579068+00:00 app[web.1]: I, [2014-03-15T02:00:00.484920 #2] INFO -- : Filter chain halted as #<Proc:0x007fbfea3bbbe8@/app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_controller/metal/http_authentication.rb:71> rendered or redirected 2014-03-15T02:00:00.578583+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:incall' 2014-03-15T02:00:00.578079+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/middleware/request_id.rb:21:in call' 2014-03-15T02:00:00.578583+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/middleware/request_id.rb:21:incall' 2014-03-15T02:00:00.579068+00:00 app[web.1]: 2014-03-15T02:00:00.579068+00:00 app[web.1]: I, [2014-03-15T02:00:00.576783 #2] INFO -- : Processing by PostsController#create as HTML 2014-03-15T02:00:00.578900+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in service' 2014-03-15T02:00:00.578079+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/cache/strategy/local_cache.rb:83:incall' 2014-03-15T02:00:00.578900+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in service' 2014-03-15T02:00:00.578410+00:00 app[web.1]: 2014-03-15T02:00:00.578583+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/rack/logger.rb:20:incall' 2014-03-15T02:00:00.578900+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call' 2014-03-15T02:00:00.579068+00:00 app[web.1]: I, [2014-03-15T02:00:00.485104 #2] INFO -- : Completed 401 Unauthorized in 1ms (ActiveRecord: 0.0ms) 2014-03-15T02:00:00.598183+00:00 heroku[router]: at=info method=POST path=/posts host=forum-epic.herokuapp.com request_id=0113c1f4-9fb0-45ba-83c9-77dc456143fd fwd="187.253.215.208" dyno=web.1 connect=1ms service=23ms status=302 bytes=946 2014-03-15T02:00:00.870347+00:00 heroku[router]: at=info method=GET path=/posts/1 host=forum-epic.herokuapp.com request_id=35d4abfc-e688-4997-806f-45264d8147f9 fwd="187.253.215.208" dyno=web.1 connect=1ms service=24ms status=500 bytes=1543 2014-03-15T02:00:07.379621+00:00 heroku[router]: at=info method=GET path=/posts/1 host=forum-epic.herokuapp.com request_id=f41315f4-4b50-4ba3-858e-2c3fd8af0cce fwd="187.253.215.208" dyno=web.1 connect=1ms service=47ms status=500 bytes=1543

编辑:这是 Rails 的指南,我推入 heroku master。

我能做什么?我是heroku的新手,我不知道如何解决它,我希望有人能帮助我。谢谢。

【问题讨论】:

  • ActionController::RoutingError (No route matches [GET] "/assets/application-f472f62f2e8bac4049be455c1a6b8f1d.js") 这一行可能会让您对自己的问题有所了解。 Heroku 需要一些设置来预编译资产,具体取决于您在哪里提供服务。查看此链接:devcenter.heroku.com/articles/rails-asset-pipeline
  • Tx 回答约翰,但这不起作用,错误不断出现:/

标签: ruby-on-rails ruby ruby-on-rails-3 heroku


【解决方案1】:

在将应用程序部署到 heroku 时运行这些命令

heroku run rake assets:clean
heroku run rake assets:precompile

【讨论】:

  • 嗨,Ashish,我在终端中写道,运行rake assests:clean 连接到终端...起来,run.7440 rake 中止!不知道如何构建任务“assets:clean”(通过使用 --trace 运行任务查看完整跟踪)
  • 这里有一个错字,你拼写的是assests而不是assets
猜你喜欢
  • 2016-11-19
  • 1970-01-01
  • 2021-10-25
  • 2019-01-03
  • 1970-01-01
  • 2013-08-06
  • 1970-01-01
  • 2013-05-05
  • 2017-01-07
相关资源
最近更新 更多