应用程序错误:应用程序中发生错误,无法提供您的页面。 Heroku的

时间:2012-07-19 02:17:38

标签: heroku

好吧我好像无法在Heroku中部署我的测试应用程序。

部署问题仍然存在。

这是我的日志。请帮我分析一下错误:

C:\Users\Rowell\peekboxbeta>heroku logs --app gentle-beach-4013
2012-07-13T03:41:40+00:00 app[web.12]:
2012-07-13T03:41:40+00:00 app[web.12]: ActionController::RoutingError (No route matches [GET] "/users/assets/pb/f
avicon.jpg"):
2012-07-13T03:41:40+00:00 app[web.12]:
2012-07-13T03:41:40+00:00 app[web.12]:
2012-07-13T03:41:40+00:00 app[web.12]:
2012-07-13T03:41:40+00:00 app[web.12]: cache: [GET /users/assets/pb/favicon.jpg] miss
2012-07-13T03:41:40+00:00 heroku[router]: GET www.peekbox.tv/users/assets/pb/favicon.jpg dyno=web.12 queue=0 wait
=0ms service=6ms status=404 bytes=728
2012-07-13T03:41:40+00:00 app[web.5]:
2012-07-13T03:41:40+00:00 app[web.5]:
2012-07-13T03:41:40+00:00 app[web.5]: Started GET "/assets/pb/prev-arrow.png" for 203.177.42.214 at 2012-07-13 11
:41:40 +0800
2012-07-13T03:41:40+00:00 app[web.5]: cache: [GET /assets/pb/prev-arrow.png] stale, valid, store
2012-07-13T03:41:40+00:00 heroku[router]: GET www.peekbox.tv/assets/pb/menu-bg.png dyno=web.6 queue=0 wait=0ms se
rvice=3ms status=200 bytes=2835
2012-07-13T03:41:40+00:00 heroku[router]: GET www.peekbox.tv/assets/pb/bird.png dyno=web.2 queue=0 wait=0ms servi
ce=4ms status=200 bytes=1833
2012-07-13T03:41:40+00:00 app[web.2]: Started GET "/assets/pb/bird.png" for 203.177.42.214 at 2012-07-13 11:41:40
 +0800
2012-07-13T03:41:40+00:00 app[web.2]:
2012-07-13T03:41:40+00:00 app[web.2]:
2012-07-13T03:41:40+00:00 app[web.2]: cache: [GET /assets/pb/bird.png] stale, valid, store
2012-07-13T03:41:40+00:00 app[web.4]:
2012-07-13T03:41:40+00:00 app[web.4]:
2012-07-13T03:41:40+00:00 app[web.4]: Started GET "/assets/pb/twitter_32.png" for 203.177.42.214 at 2012-07-13 11
:41:40 +0800
2012-07-13T03:41:40+00:00 app[web.4]: cache: [GET /assets/pb/twitter_32.png] stale, valid, store
2012-07-13T03:41:40+00:00 app[web.11]:
2012-07-13T03:41:40+00:00 app[web.11]:
2012-07-13T03:41:40+00:00 app[web.11]: Started GET "/assets/pb/bottom-shadow.png" for 203.177.42.214 at 2012-07-1
3 11:41:40 +0800
2012-07-13T03:41:40+00:00 heroku[router]: GET www.peekbox.tv/assets/pb/twitter_32.png dyno=web.4 queue=0 wait=0ms
 service=4ms status=200 bytes=2313
2012-07-13T03:41:40+00:00 app[web.11]: cache: [GET /assets/pb/bottom-shadow.png] stale, valid, store
2012-07-13T03:41:40+00:00 heroku[router]: GET www.peekbox.tv/assets/pb/bottom-shadow.png dyno=web.11 queue=0 wait
=0ms service=6ms status=200 bytes=145
2012-07-13T03:41:40+00:00 heroku[router]: GET www.peekbox.tv/assets/pb/prev-arrow.png dyno=web.5 queue=0 wait=0ms
 service=5ms status=200 bytes=1043
2012-07-13T03:41:40+00:00 app[web.9]:
2012-07-13T03:41:40+00:00 app[web.9]:
2012-07-13T03:41:40+00:00 app[web.9]: Started GET "/assets/pb/facebook_32.png" for 203.177.42.214 at 2012-07-13 1
1:41:40 +0800
2012-07-13T03:41:40+00:00 app[web.9]: cache: [GET /assets/pb/facebook_32.png] stale, valid, store
2012-07-13T03:41:40+00:00 app[web.3]:
2012-07-13T03:41:40+00:00 app[web.3]:
2012-07-13T03:41:40+00:00 app[web.3]: Started GET "/assets/pb/footer-bullet.png" for 203.177.42.214 at 2012-07-13
 11:41:40 +0800
2012-07-13T03:41:40+00:00 heroku[router]: GET www.peekbox.tv/assets/pb/facebook_32.png dyno=web.9 queue=0 wait=0m
s service=18ms status=200 bytes=2094
2012-07-13T03:41:40+00:00 app[web.3]: cache: [GET /assets/pb/footer-bullet.png] stale, valid, store
2012-07-13T03:41:40+00:00 heroku[router]: GET www.peekbox.tv/assets/pb/footer-bullet.png dyno=web.3 queue=0 wait=
0ms service=21ms status=200 bytes=391
2012-07-13T03:41:40+00:00 app[web.6]:
2012-07-13T03:41:40+00:00 app[web.6]:
2012-07-13T03:41:40+00:00 app[web.6]: Started GET "/assets/pb/menu-bg.png" for 203.177.42.214 at 2012-07-13 11:41
:40 +0800
2012-07-13T03:41:40+00:00 app[web.6]: Started GET "/assets/pb/header-glow.png" for 203.177.42.214 at 2012-07-13 1
1:41:40 +0800
2012-07-13T03:41:40+00:00 app[web.6]: cache: [GET /assets/pb/menu-bg.png] stale, valid, store
2012-07-13T03:41:40+00:00 app[web.6]:
2012-07-13T03:41:40+00:00 app[web.6]:
2012-07-13T03:41:40+00:00 app[web.6]: cache: [GET /assets/pb/header-glow.png] stale, valid, store
2012-07-13T03:41:40+00:00 app[web.6]:
2012-07-13T03:41:40+00:00 app[web.6]:
2012-07-13T03:41:40+00:00 app[web.6]: Started GET "/assets/pb/twitter-border.png" for 203.177.42.214 at 2012-07-1
3 11:41:40 +0800
2012-07-13T03:41:40+00:00 app[web.6]: cache: [GET /assets/pb/twitter-border.png] stale, valid, store
2012-07-13T03:41:40+00:00 heroku[router]: GET www.peekbox.tv/assets/pb/header-glow.png dyno=web.6 queue=0 wait=0m
s service=36ms status=200 bytes=36446
2012-07-13T03:41:40+00:00 heroku[router]: GET www.peekbox.tv/assets/pb/twitter-border.png dyno=web.6 queue=0 wait
=0ms service=37ms status=200 bytes=117
2012-07-13T03:41:41+00:00 app[web.10]:
2012-07-13T03:41:41+00:00 app[web.10]: Started GET "/assets/pb/noise.png" for 203.177.42.214 at 2012-07-13 11:41:
40 +0800
2012-07-13T03:41:41+00:00 app[web.10]:
2012-07-13T03:41:41+00:00 app[web.10]: cache: [GET /assets/pb/noise.png] stale, valid, store
2012-07-13T03:41:41+00:00 heroku[router]: GET www.peekbox.tv/assets/pb/noise.png dyno=web.10 queue=0 wait=0ms ser
vice=957ms status=304 bytes=0
2012-07-13T03:41:41+00:00 app[web.10]:
2012-07-13T03:41:41+00:00 app[web.10]: Started GET "/assets/pb/next-arrow.png" for 203.177.42.214 at 2012-07-13 1
1:41:41 +0800
2012-07-13T03:41:41+00:00 app[web.10]:
2012-07-13T03:41:41+00:00 app[web.10]: cache: [GET /assets/pb/next-arrow.png] stale, valid, store
2012-07-13T03:41:41+00:00 heroku[router]: GET www.peekbox.tv/assets/pb/next-arrow.png dyno=web.10 queue=0 wait=0m
s service=858ms status=304 bytes=0
2012-07-13T03:41:42+00:00 app[web.8]: Started GET "/bo" for 180.194.245.32 at 2012-07-13 11:41:42 +0800
2012-07-13T03:41:42+00:00 app[web.8]:
2012-07-13T03:41:42+00:00 app[web.8]:   Processing by InformationController#show as HTML
2012-07-13T03:41:42+00:00 app[web.8]:   Parameters: {"username"=>"bo"}
2012-07-13T03:41:42+00:00 app[web.8]:
2012-07-13T03:41:42+00:00 app[web.8]: Rendered information/_pic.html.haml (0.9ms)
2012-07-13T03:41:42+00:00 app[web.8]: Rendered information/_d
ata.html.haml (0.5ms)
2012-07-13T03:41:42+00:00 app[web.8]: Rendered information/_controls.html.haml (6.3ms)
2012-07-13T03:41:43+00:00 app[web.8]: Rendered information/_wall_post.html.haml (1227.0ms)
2012-07-13T03:41:43+00:00 app[web.8]: Rendered information/show.html.haml within layouts/application (1236.4ms)
2012-07-13T03:41:43+00:00 app[web.8]: Completed 500 Internal Server Error in 1242ms
2012-07-13T03:41:43+00:00 app[web.8]:
2012-07-13T03:41:43+00:00 app[web.8]: ActionView::Template::Error (undefined method `profilepic' for nil:NilClass
):
2012-07-13T03:41:43+00:00 app[web.8]:     5:    %div.post
2012-07-13T03:41:43+00:00 app[web.8]:     6:            -@wall_posts.each do |post|
2012-07-13T03:41:43+00:00 app[web.8]:     8:                            -unless post.poster.profilepic == nil
2012-07-13T03:41:43+00:00 app[web.8]:     9:                                    %div#wall-post
2012-07-13T03:41:43+00:00 app[web.8]:     7:                    %div
2012-07-13T03:41:43+00:00 app[web.8]:     10:                                           %div#wall-poster-pic
2012-07-13T03:41:43+00:00 app[web.8]:     11:                                                   =link_to (image_t
ag post.poster.profilepic_url(:profile_pic) ,:style => "width:50px;height:76px"), other_user_path(post.poster.use
rname)
2012-07-13T03:41:43+00:00 app[web.8]:   app/views/information/_wall_post.html.haml:8:in `block in _app_views_info
rmation__wall_post_html_haml___575386532158736245_58517160'
2012-07-13T03:41:43+00:00 app[web.8]:   app/views/information/_wall_post.html.haml:6:in `_app_views_information__
wall_post_html_haml___575386532158736245_58517160'
2012-07-13T03:41:43+00:00 app[web.8]:   app/views/information/show.html.haml:20:in `_app_views_information_show_h
tml_haml__598682898842295215_31999300'
2012-07-13T03:41:43+00:00 app[web.8]:
2012-07-13T03:41:43+00:00 app[web.8]:
2012-07-13T03:41:43+00:00 app[web.8]: cache: [GET /bo] miss
2012-07-13T03:41:43+00:00 heroku[router]: GET www.peekbox.tv/bo dyno=web.8 queue=0 wait=0ms service=1252ms status
=500 bytes=728
2012-07-13T03:41:43+00:00 heroku[nginx]: 180.194.245.32 - - [13/Jul/2012:03:41:43 +0000] "GET /bo HTTP/1.0" 500 7
28 "http://www.peekbox.tv/profile" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20
.0.1132.57 Safari/536.11" www.peekbox.tv
2012-07-13T03:41:44+00:00 heroku[nginx]: 180.194.245.32 - - [13/Jul/2012:03:41:44 +0000] "GET /favicon.ico HTTP/1
.0" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536
.11" www.peekbox.tv
2012-07-13T03:42:27+00:00 heroku[worker.2]: State changed from crashed to starting
2012-07-13T03:42:31+00:00 heroku[worker.2]: Starting process with command `bundle exec rake jobs:work`
2012-07-13T03:42:32+00:00 heroku[worker.2]: State changed from starting to up
2012-07-13T03:42:37+00:00 app[worker.2]: rake aborted!
2012-07-13T03:42:37+00:00 app[worker.2]: Don't know how to build task 'jobs:work'
2012-07-13T03:42:37+00:00 app[worker.2]:
2012-07-13T03:42:37+00:00 app[worker.2]: (See full trace by running task with --trace)
2012-07-13T03:42:38+00:00 heroku[worker.2]: Process exited with status 1
2012-07-13T03:42:38+00:00 heroku[worker.2]: State changed from up to crashed

C:\Users\Rowell\peekboxbeta>heroku rake db:version
WARNING: `heroku rake` has been deprecated. Please use `heroku run rake` instead.
Running `rake db:version` attached to terminal... failed
 !    No app specified.
 !    Run this command from an app folder or specify which app to use with --app <app name>

C:\Users\Rowell\peekboxbeta>heroku rake db:version --app gentle-beach-4013
WARNING: `heroku rake` has been deprecated. Please use `heroku run rake` instead.
Running `rake db:version` attached to terminal... up, run.1
Current version: 20120501142157

严重的是它仍然因为大量错误而崩溃

请参阅:http://peekboxtest.herokuapp.com/

谢谢!我现在很绝望。我已经尝试将gem pg放在生产组中,将sqlite3放在dev组中。但没有其他事情发生。

2 个答案:

答案 0 :(得分:0)

修改 config / application.rb

config.assets.enabled = true

将以下内容添加到Gemfile。

group :assets do
  gem 'therubyracer'
  gem 'sass-rails', "  ~> 3.1.0"
  gem 'coffee-rails', "~> 3.1.0"
  gem 'uglifier'
end

运行

bundle install

rake assets:precompile

试试吧。

答案 1 :(得分:0)

您的错误与

有关
ActionView::Template::Error (undefined method `profilepic' for nil:NilClass

由于

而被抛出
unless post.poster.profilepic

因此,您的post没有关联的poster - 通过检查帖子是否有帖子

来修复
unless post.poster? && post.poster.profilepic
...