0

好的,所以我正在继续一个由其他人从事的项目,但在开始时遇到了麻烦。大多数网页都能正常工作,但这个网页无法加载并给出“抱歉,但出现了错误 heroku 错误”。编辑为显示日志:

2013-07-13T22:48:54.242683+00:00 app[web.1]: Completed 401 Unauthorized in 0ms
2013-07-13T22:49:24.652125+00:00 app[web.1]: Started GET "/users/" for 184.73.237.85 at 2013-07-13 22:49:24 +0000
2013-07-13T22:49:24.657848+00:00 app[web.1]: Processing by UsersController#index as */*
2013-07-13T22:49:24.657848+00:00 app[web.1]: Completed 401 Unauthorized in 0ms
2013-07-13T22:49:24.659765+00:00 heroku[router]: at=info method=HEAD path=/users/ host=statitup.herokuapp.com fwd="184.73.237.85" dyno=web.1 connect=1ms service=12ms status=302 bytes=0
2013-07-13T22:49:36.267545+00:00 app[web.1]: Completed 401 Unauthorized in 0ms
2013-07-13T22:49:36.271518+00:00 heroku[router]: at=info method=HEAD path=/users/ host=statitup.herokuapp.com fwd="50.112.95.211" dyno=web.1 connect=1ms service=11ms status=302 bytes=0
2013-07-13T22:49:36.267545+00:00 app[web.1]: Processing by UsersController#index as */*
2013-07-13T22:49:36.263202+00:00 app[web.1]: Started GET "/users/" for 50.112.95.211 at 2013-07-13 22:49:36 +0000
2013-07-13T22:50:22.797779+00:00 heroku[router]: at=info method=HEAD path=/users/ host=statitup.herokuapp.com fwd="204.93.223.151" dyno=web.1 connect=2ms service=12ms status=302 bytes=0
2013-07-13T22:50:22.793360+00:00 app[web.1]: Processing by UsersController#index as */*
2013-07-13T22:50:22.789286+00:00 app[web.1]: Started GET "/users/" for 204.93.223.151 at 2013-07-13 22:50:22 +0000
2013-07-13T22:50:22.793360+00:00 app[web.1]: Completed 401 Unauthorized in 0ms
2013-07-13T22:50:32.854645+00:00 app[web.1]: Started GET "/" for 69.253.43.209 at 2013-07-13 22:50:32 +0000
2013-07-13T22:50:32.862423+00:00 heroku[router]: at=info method=GET path=/ host=statitup.herokuapp.com fwd="69.253.43.209" dyno=web.1 connect=2ms service=11ms status=302 bytes=109
2013-07-13T22:50:32.859366+00:00 app[web.1]: Processing by UsersController#index as HTML
2013-07-13T22:50:32.859366+00:00 app[web.1]: Completed 401 Unauthorized in 0ms
2013-07-13T22:50:32.771775+00:00 heroku[router]: at=info code=H16 desc="herokuapp redirect" method=GET path=/ host=statitup.heroku.com fwd="69.253.43.209" dyno= connect= service= status=301 bytes=
2013-07-13T22:50:32.918512+00:00 app[web.1]: Started GET "/users/sign_in" for 69.253.43.209 at 2013-07-13 22:50:32 +0000
2013-07-13T22:50:32.939617+00:00 app[web.1]: Completed 200 OK in 16ms (Views: 14.3ms | ActiveRecord: 0.0ms)
2013-07-13T22:50:32.939617+00:00 app[web.1]: Processing by Devise::SessionsController#new as HTML
2013-07-13T22:50:32.939617+00:00 app[web.1]:   Rendered devise/sessions/new.html.erb within layouts/application (3.8ms)
2013-07-13T22:50:32.939617+00:00 app[web.1]:   Rendered layouts/_footer.html.erb (0.1ms)
2013-07-13T22:50:32.952994+00:00 heroku[router]: at=info method=GET path=/users/sign_in host=statitup.herokuapp.com fwd="69.253.43.209" dyno=web.1 connect=6ms service=38ms status=200 bytes=10410
2013-07-13T22:50:33.007693+00:00 heroku[router]: at=info method=GET path=/assets/application-fd933ac454d6a0ea35b3b5adcd6f1204.css host=statitup.herokuapp.com fwd="69.253.43.209" dyno=web.1 connect=2ms service=19ms status=200 bytes=280630
2013-07-13T22:50:33.089756+00:00 heroku[router]: at=info method=GET path=/assets/application-8ba7ca1fe7c19bd934c2b34512260f28.js host=statitup.herokuapp.com fwd="69.253.43.209" dyno=web.1 connect=2ms service=19ms status=200 bytes=347056
2013-07-13T22:50:35.909701+00:00 heroku[router]: at=info method=GET path=/favicon.ico host=statitup.herokuapp.com fwd="69.253.43.209" dyno=web.1 connect=1ms service=8ms status=200 bytes=0
2013-07-13T22:50:41.924753+00:00 app[web.1]: Started POST "/users/sign_in" for 69.253.43.209 at 2013-07-13 22:50:41 +0000
2013-07-13T22:50:42.097659+00:00 app[web.1]: Processing by Devise::SessionsController#create as HTML
2013-07-13T22:50:42.097659+00:00 app[web.1]: Completed 302 Found in 167ms (ActiveRecord: 0.0ms)
2013-07-13T22:50:42.097659+00:00 app[web.1]:   Parameters: {"utf8"=>"✓", "user"=>{"email"=>"aschade@sas.upenn.edu", "password"=>"[FILTERED]", "remember_me"=>"1"}, "commit"=>"Sign in"}
2013-07-13T22:50:42.097659+00:00 app[web.1]: Redirected to http://statitup.herokuapp.com/
2013-07-13T22:50:42.100695+00:00 heroku[router]: at=info method=POST path=/users/sign_in host=statitup.herokuapp.com fwd="69.253.43.209" dyno=web.1 connect=2ms service=226ms status=302 bytes=96
2013-07-13T22:50:42.161920+00:00 app[web.1]: Started GET "/" for 69.253.43.209 at 2013-07-13 22:50:42 +0000
2013-07-13T22:50:42.179589+00:00 app[web.1]:   Rendered users/index.html.erb within layouts/application (6.3ms)
2013-07-13T22:50:42.179589+00:00 app[web.1]:   Rendered layouts/_footer.html.erb (0.1ms)
2013-07-13T22:50:42.179589+00:00 app[web.1]: Completed 200 OK in 13ms (Views: 6.7ms | ActiveRecord: 3.5ms)
2013-07-13T22:50:42.179589+00:00 app[web.1]: Processing by UsersController#index as HTML
2013-07-13T22:50:42.184202+00:00 heroku[router]: at=info method=GET path=/ host=statitup.herokuapp.com fwd="69.253.43.209" dyno=web.1 connect=2ms service=27ms status=200 bytes=5562
2013-07-13T22:50:43.778972+00:00 app[web.1]:     79:         'start': new Date(<%= @bp.first.created_at.strftime("%Y") %>, (<%= @bp.first.created_at.strftime("%m") %> - 1), <%= @bp.first.created_at.strftime("%e") %>, <%= @bp.first.created_at.strftime("%k") %>, <%= @bp.first.created_at.strftime("%M") %>, <%= @bp.first.created_at.strftime("%S") %>),
2013-07-13T22:50:43.778972+00:00 app[web.1]: 
2013-07-13T22:50:43.779152+00:00 app[web.1]:   app/controllers/stats_controller.rb:46:in `index'
2013-07-13T22:50:43.779339+00:00 app[web.1]:   Rendered stats/index.html.erb within layouts/application (2.0ms)
2013-07-13T22:50:43.778972+00:00 app[web.1]: ActionView::Template::Error (undefined method `created_at' for nil:NilClass):
2013-07-13T22:50:43.778972+00:00 app[web.1]:     81:       //'state': {'range': {'start': first, 'end': last}}
2013-07-13T22:50:43.779339+00:00 app[web.1]: Processing by StatsController#index as HTML
2013-07-13T22:50:43.762823+00:00 app[web.1]: Started GET "/stats" for 69.253.43.209 at 2013-07-13 22:50:43 +0000
2013-07-13T22:50:43.778972+00:00 app[web.1]:     76:       // Initial range: 2012-02-09 to 2012-03-20.
2013-07-13T22:50:43.779152+00:00 app[web.1]: 
2013-07-13T22:50:43.778972+00:00 app[web.1]:     78:       'state': {'range': {
2013-07-13T22:50:43.779152+00:00 app[web.1]: 
2013-07-13T22:50:43.778972+00:00 app[web.1]:     80:         'end': new Date(<%= @bp.last.created_at.strftime("%Y") %>, (<%= @bp.last.created_at.strftime("%m") %> - 1), <%= @bp.last.created_at.strftime("%e") %>, <%= @bp.last.created_at.strftime("%k") %>, <%= @bp.last.created_at.strftime("%M") %>, <%= @bp.last.created_at.strftime("%S") %>)}}
2013-07-13T22:50:43.778972+00:00 app[web.1]:     82:     });
2013-07-13T22:50:43.778972+00:00 app[web.1]:     77:       //'state': {'range': {'start': new Date(2013, 0, 1), 'end': new Date(2013, 4, 2)}}
2013-07-13T22:50:43.779339+00:00 app[web.1]: Completed 500 Internal Server Error in 8ms
2013-07-13T22:50:43.778972+00:00 app[web.1]:   app/views/stats/index.html.erb:79:in `_app_views_stats_index_html_erb__2767662790772891844_35763980'
2013-07-13T22:50:43.820606+00:00 heroku[router]: at=info method=GET path=/stats host=statitup.herokuapp.com fwd="69.253.43.209" dyno=web.1 connect=1ms service=61ms status=500 bytes=643
2013-07-13T22:50:54.241260+00:00 app[web.1]: Started GET "/users/" for 50.18.57.7 at 2013-07-13 22:50:54 +0000
2013-07-13T22:50:54.246383+00:00 app[web.1]: Processing by UsersController#index as */*
2013-07-13T22:50:54.246383+00:00 app[web.1]: Completed 401 Unauthorized in 0ms
2013-07-13T22:50:54.251869+00:00 heroku[router]: at=info method=HEAD path=/users/ host=statitup.herokuapp.com fwd="50.18.57.7" dyno=web.1 connect=1ms service=11ms status=302 bytes=0
2013-07-13T22:51:24.550342+00:00 app[web.1]: Started GET "/users/" for 184.73.237.85 at 2013-07-13 22:51:24 +0000
2013-07-13T22:51:24.555773+00:00 heroku[router]: at=info method=HEAD path=/users/ host=statitup.herokuapp.com fwd="184.73.237.85" dyno=web.1 connect=1ms service=8ms status=302 bytes=0
2013-07-13T22:51:24.554278+00:00 app[web.1]: Processing by UsersController#index as */*
2013-07-13T22:51:24.554278+00:00 app[web.1]: Completed 401 Unauthorized in 0ms
2013-07-13T22:51:36.273183+00:00 app[web.1]: Started GET "/users/" for 50.112.95.211 at 2013-07-13 22:51:36 +0000
2013-07-13T22:51:36.279094+00:00 app[web.1]: Completed 401 Unauthorized in 1ms
2013-07-13T22:51:36.279094+00:00 app[web.1]: Processing by UsersController#index as */*
2013-07-13T22:51:36.282064+00:00 heroku[router]: at=info method=HEAD path=/users/ host=statitup.herokuapp.com fwd="50.112.95.211" dyno=web.1 connect=1ms service=10ms status=302 bytes=0
2013-07-13T22:52:22.305998+00:00 app[web.1]: Started GET "/users/" for 204.93.223.151 at 2013-07-13 22:52:22 +0000
2013-07-13T22:52:22.309953+00:00 app[web.1]: Processing by UsersController#index as */*
2013-07-13T22:52:22.309953+00:00 app[web.1]: Completed 401 Unauthorized in 0ms
2013-07-13T22:52:22.313327+00:00 heroku[router]: at=info method=HEAD path=/users/ host=statitup.herokuapp.com fwd="204.93.223.151" dyno=web.1 connect=2ms service=11ms status=302 bytes=0
2013-07-13T22:52:54.257302+00:00 app[web.1]: Processing by UsersController#index as */*
2013-07-13T22:52:54.259081+00:00 heroku[router]: at=info method=HEAD path=/users/ host=statitup.herokuapp.com fwd="50.18.57.7" dyno=web.1 connect=1ms service=8ms status=302 bytes=0
2013-07-13T22:52:54.257302+00:00 app[web.1]: Completed 401 Unauthorized in 0ms
2013-07-13T22:52:54.252167+00:00 app[web.1]: Started GET "/users/" for 50.18.57.7 at 2013-07-13 22:52:54 +0000
2013-07-13T22:53:24.645611+00:00 app[web.1]: Started GET "/users/" for 184.73.237.85 at 2013-07-13 22:53:24 +0000
2013-07-13T22:53:24.661404+00:00 app[web.1]: Completed 401 Unauthorized in 0ms
2013-07-13T22:53:24.661404+00:00 app[web.1]: Processing by UsersController#index as */*
2013-07-13T22:53:24.674506+00:00 heroku[router]: at=info method=HEAD path=/users/ host=statitup.herokuapp.com fwd="184.73.237.85" dyno=web.1 connect=1ms service=31ms status=302 bytes=0
2013-07-13T22:53:36.266076+00:00 app[web.1]: Started GET "/users/" for 50.112.95.211 at 2013-07-13 22:53:36 +0000
2013-07-13T22:53:36.281406+00:00 heroku[router]: at=info method=HEAD path=/users/ host=statitup.herokuapp.com fwd="50.112.95.211" dyno=web.1 connect=1ms service=16ms status=302 bytes=0
2013-07-13T22:53:36.278796+00:00 app[web.1]: Processing by UsersController#index as */*
2013-07-13T22:53:36.278796+00:00 app[web.1]: Completed 401 Unauthorized in 0ms
2013-07-13T22:54:22.349939+00:00 app[web.1]: Started GET "/users/" for 204.93.223.151 at 2013-07-13 22:54:22 +0000
2013-07-13T22:54:22.359597+00:00 heroku[router]: at=info method=HEAD path=/users/ host=statitup.herokuapp.com fwd="204.93.223.151" dyno=web.1 connect=2ms service=15ms status=302 bytes=0
2013-07-13T22:54:22.356103+00:00 app[web.1]: Completed 401 Unauthorized in 0ms
2013-07-13T22:54:22.356103+00:00 app[web.1]: Processing by UsersController#index as */*
2013-07-13T22:54:54.298559+00:00 app[web.1]: Started GET "/users/" for 50.18.57.7 at 2013-07-13 22:54:54 +0000
2013-07-13T22:54:54.305714+00:00 app[web.1]: Completed 401 Unauthorized in 0ms
2013-07-13T22:54:54.305714+00:00 app[web.1]: Processing by UsersController#index as */*
2013-07-13T22:54:54.312984+00:00 heroku[router]: at=info method=HEAD path=/users/ host=statitup.herokuapp.com fwd="50.18.57.7" dyno=web.1 connect=7ms service=17ms status=302 bytes=0
2013-07-13T22:55:25.025850+00:00 app[web.1]: Started GET "/users/" for 184.73.237.85 at 2013-07-13 22:55:25 +0000
2013-07-13T22:55:25.030908+00:00 app[web.1]: Processing by UsersController#index as */*
2013-07-13T22:55:25.030908+00:00 app[web.1]: Completed 401 Unauthorized in 0ms
2013-07-13T22:55:25.033020+00:00 heroku[router]: at=info method=HEAD path=/users/ host=statitup.herokuapp.com fwd="184.73.237.85" dyno=web.1 connect=1ms service=10ms status=302 bytes=0
2013-07-13T22:55:36.280634+00:00 app[web.1]: Started GET "/users/" for 50.112.95.211 at 2013-07-13 22:55:36 +0000
2013-07-13T22:55:36.284696+00:00 app[web.1]: Completed 401 Unauthorized in 0ms
2013-07-13T22:55:36.284696+00:00 app[web.1]: Processing by UsersController#index as */*
2013-07-13T22:55:36.284054+00:00 heroku[router]: at=info method=HEAD path=/users/ host=statitup.herokuapp.com fwd="50.112.95.211" dyno=web.1 connect=0ms service=19ms status=302 bytes=0

所以很明显,在我之前从事此工作的人正在使用一些谷歌包在网页上显示图表。Heroku 中没有包含附加组件的问题吗?有谁知道那个应用程序可能是什么?我错过了宝石吗?抱歉,如果这是一个完全的菜鸟问题,但我已经浪费了很多时间来弄清楚它,我认为答案可能并不太复杂。

4

2 回答 2

1

该代码与 Google Charts 相关,并且由于它是基于 JavaScript 的,因此它是在运行时在用户浏览器中从 Google 网站下载的。因此,您很可能没有错过任何“宝石”,除非您可以指出您所看到的一些错误,否则会表明其他错误。

此外,使用以下命令检查heroku 日志

heroku logs
于 2013-07-13T19:03:22.040 回答
0

除了 Wand Maker 的帖子,你可以进入终端运行

heroku logs -t -n 100

此命令运行尾随日志,这意味着最新的 100 个(或您指定的任意多个)将自动更新到您的终端,从而允许您运行更全面的测试。

此外,如果您可以删除那个冗长的 JS,而是向我们展示您的 heroku 日志,那就更好了。

于 2013-07-13T19:13:44.340 回答