Heroku - 网站无法正常工作

时间:2011-06-24 18:54:02

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

我有一个在本地完全正常工作的网站,当我使用git push heroku master它似乎工作正常,但是当我在浏览器中实际打开heroku网站时,我只收到一条消息“我们很抱歉但是出了点问题。我们已经收到有关此问题的通知,我们很快就会对其进行审核。“我不知道为什么会这样。有人可以建议可能出现这种情况的原因以及我应该在哪里开始调试这个问题吗? (或者,如果你知道如何解决它,那就更好了)

这是我的heroku logs文件:

$ heroku logs
←[36m2011-06-22T15:04:56+00:00 app[web.1]:←[0m                AND a.attnum > 0 A
ND NOT a.attisdropped
←[36m2011-06-22T15:04:56+00:00 app[web.1]:←[0m              ORDER BY a.attnum
←[36m2011-06-22T15:04:56+00:00 app[web.1]:←[0m ):
←[36m2011-06-22T15:04:56+00:00 app[web.1]:←[0m     3:   <nav class="round">
←[36m2011-06-22T15:04:56+00:00 app[web.1]:←[0m     4:           <ul>
←[36m2011-06-22T15:04:56+00:00 app[web.1]:←[0m     5:                   <li><%=
link_to "Home", root_path %></li>
←[36m2011-06-22T15:04:56+00:00 app[web.1]:←[0m     6:                   <% if si
gned_in? %>
←[36m2011-06-22T15:04:56+00:00 app[web.1]:←[0m     7:
<li><%= link_to "Profile", current_user %></li>
←[36m2011-06-22T15:04:56+00:00 app[web.1]:←[0m     8:                   <% end %
>
←[36m2011-06-22T15:04:56+00:00 app[web.1]:←[0m   app/helpers/sessions_helper.rb:
32:in `current_user'
←[36m2011-06-22T15:04:56+00:00 app[web.1]:←[0m   app/helpers/sessions_helper.rb:
14:in `signed_in?'
←[36m2011-06-22T15:04:56+00:00 app[web.1]:←[0m   app/views/layouts/_header.html.
erb:6:in `_app_views_layouts__header_html_erb___4148554853093522439_33446860__59
0688683808415561'
←[36m2011-06-22T15:04:56+00:00 app[web.1]:←[0m   app/views/layouts/application.h
tml.erb:10:in `_app_views_layouts_application_html_erb__576924491411701191_33609
960_2126834257218669256'
←[33m2011-06-22T15:04:56+00:00 heroku[router]:←[0m GET growing-dusk-285.heroku.c
om/favicon.ico dyno=web.1 queue=0 wait=0ms service=4ms status=200 bytes=0
←[36m2011-06-22T16:06:21+00:00 heroku[web.1]:←[0m Idling
←[36m2011-06-22T16:06:28+00:00 heroku[web.1]:←[0m Stopping process with SIGTERM
←[36m2011-06-22T16:06:28+00:00 app[web.1]:←[0m >> Stopping ...
←[36m2011-06-22T16:06:28+00:00 heroku[web.1]:←[0m Process exited
←[36m2011-06-22T16:06:31+00:00 heroku[web.1]:←[0m State changed from up to down
←[32m2011-06-24T18:49:29+00:00 heroku[slugc]:←[0m Slug compilation started
←[35m2011-06-24T18:50:32+00:00 heroku[api]:←[0m Deploy 95e629a by danidickstein@
yahoo.com
←[35m2011-06-24T18:50:32+00:00 heroku[api]:←[0m Release v6 created by danidickst
ein@yahoo.com
←[32m2011-06-24T18:50:32+00:00 heroku[slugc]:←[0m Slug compilation finished
←[36m2011-06-24T18:50:41+00:00 heroku[web.1]:←[0m Unidling
←[36m2011-06-24T18:50:41+00:00 heroku[web.1]:←[0m State changed from down to cre
ated
←[36m2011-06-24T18:50:41+00:00 heroku[web.1]:←[0m State changed from created to
starting
←[36m2011-06-24T18:50:46+00:00 heroku[web.1]:←[0m Starting process with command:
 `thin -p 36055 -e production -R /home/heroku_rack/heroku.ru start`
←[36m2011-06-24T18:50:49+00:00 app[web.1]:←[0m >> Thin web server (v1.2.6 codena
me Crazy Delicious)
←[36m2011-06-24T18:50:49+00:00 app[web.1]:←[0m >> Maximum connections set to 102
4
←[36m2011-06-24T18:50:49+00:00 app[web.1]:←[0m >> Listening on 0.0.0.0:36055, CT
RL+C to stop
←[36m2011-06-24T18:50:51+00:00 heroku[web.1]:←[0m State changed from starting to
 up
←[36m2011-06-24T18:50:51+00:00 app[web.1]:←[0m
←[36m2011-06-24T18:50:51+00:00 app[web.1]:←[0m
←[36m2011-06-24T18:50:51+00:00 app[web.1]:←[0m Started GET "/" for 74.105.216.15
8 at 2011-06-24 11:50:51 -0700
←[36m2011-06-24T18:50:51+00:00 app[web.1]:←[0m   Processing by PagesController#h
ome as HTML
←[36m2011-06-24T18:50:51+00:00 app[web.1]:←[0m Rendered layouts/_stylesheets.htm
l.erb (0.9ms)
←[36m2011-06-24T18:50:51+00:00 app[web.1]:←[0m Rendered layouts/_header.html.erb
 (22.0ms)
←[36m2011-06-24T18:50:51+00:00 app[web.1]:←[0m Rendered pages/hom
←[31m←[0m
←[36m2011-06-24T18:50:51+00:00 app[web.1]:←[0m Completed   in 31ms
←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m
←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m ActionView::Template::Error (PGEr
ror: ERROR:  relation "users" does not exist
←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m :             SELECT a.attname, f
ormat_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m               FROM pg_attribute a
 LEFT JOIN pg_attrdef d
←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m                 ON a.attrelid = d
.adrelid AND a.attnum = d.adnum
←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m              WHERE a.attrelid = '
"users"'::regclass
←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m                AND a.attnum > 0 A
ND NOT a.attisdropped
←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m              ORDER BY a.attnum
←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m ):
←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m     3:   <nav class="round">
←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m     4:           <ul>
←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m     5:                   <li><%=
link_to "Home", root_path %></li>
←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m     6:                   <% if si
gned_in? %>
←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m     7:
<li><%= link_to "Users", users_path %></li>
←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m     8:
<li><%= link_to "Profile", current_user %></li>
←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m     9:
<li><%= link_to "Account", edit_user_path(current_user) %></li>
←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m   app/models/user.rb:44:in `authe
nticate_with_salt'
←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m   app/helpers/sessions_helper.rb:
64:in `user_from_remember_token'
←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m   app/helpers/sessions_helper.rb:
32:in `current_user'
←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m   app/helpers/sessions_helper.rb:
14:in `signed_in?'
←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m   app/views/layouts/_header.html.
erb:6:in `_app_views_layouts__header_html_erb__3980662605318628940_24768820__141
2850422392777162'
←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m   app/views/layouts/application.h
tml.erb:15:in `_app_views_layouts_application_html_erb___4007788113023272464_250
88460__2801653751615046395'
←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m
←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m
←[33m2011-06-24T18:50:52+00:00 heroku[router]:←[0m GET growing-dusk-285.heroku.c
om/ dyno=web.1 queue=0 wait=0ms service=137ms status=500 bytes=728
←[33m2011-06-24T18:50:52+00:00 heroku[router]:←[0m GET growing-dusk-285.heroku.c
om/favicon.ico dyno=web.1 queue=0 wait=0ms service=1ms status=200 bytes=0
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m Started GET "/" for 74.105.216.15
8 at 2011-06-24 11:52:40 -0700
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m   Processing by PagesController#h
ome as HTML
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m Rendered layouts/_stylesheets.htm
l.erb (0.5ms)
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m Rendered layouts/_header.html.erb
 (10.3ms)
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m Rendered pages/home.html.erb with
in layouts/application (11.9ms)
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m Completed   in 12ms
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m ActionView::Template::Error (PGEr
ror: ERROR:  relation "users" does not exist
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m :             SELECT a.attname, f
ormat_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m               FROM pg_attribute a
 LEFT JOIN pg_attrdef d
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m                 ON a.attrelid = d
.adrelid AND a.attnum = d.adnum
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m              WHERE a.attrelid = '
"users"'::regclass
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m                AND a.attnum > 0 A
ND NOT a.attisdropped
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m              ORDER BY a.attnum
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m ):
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m     3:   <nav class="round">
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m     4:           <ul>
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m     5:                   <li><%=
link_to "Home", root_path %></li>
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m     6:                   <% if si
gned_in? %>
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m     7:
<li><%= link_to "Users", users_path %></li>
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m     8:
<li><%= link_to "Profile", current_user %></li>
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m     9:
<li><%= link_to "Account", edit_user_path(current_user) %></li>
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m   app/helpers/sessions_helper.rb:
64:in `user_from_remember_token'
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m   app/models/user.rb:44:in `authe
nticate_with_salt'
←[33m2011-06-24T18:52:40+00:00 heroku[router]:←[0m GET growing-dusk-285.heroku.c
om/ dyno=web.1 queue=0 wait=0ms service=21ms status=500 bytes=728
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m   app/helpers/sessions_helper.rb:
32:in `current_user'
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m   app/helpers/sessions_helper.rb:
14:in `signed_in?'
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m   app/views/layouts/_header.html.
erb:6:in `_app_views_layouts__header_html_erb__3980662605318628940_24768820__141
2850422392777162'
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m   app/views/layouts/application.h
tml.erb:15:in `_app_views_layouts_application_html_erb___4007788113023272464_250
88460__2801653751615046395'
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m
←[36m2011-06-24T18:52:40+00:00 app[web.1]:←[0m
←[33m2011-06-24T18:52:40+00:00 heroku[router]:←[0m GET growing-dusk-285.heroku.c
om/favicon.ico dyno=web.1 queue=0 wait=0ms service=4ms status=200 bytes=0
←[36m2011-06-24T18:52:41+00:00 heroku[nginx]:←[0m GET / HTTP/1.1 | 74.105.216.15
8 | 964 | http | 500

上述日志文件中唯一一行中显示“错误”的行:

←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m ActionView::Template::Error (PGEr
ror: ERROR:  relation "users" does not exist

这意味着什么?这是问题的原因吗?

1 个答案:

答案 0 :(得分:3)

您是否在Heroku方面迁移了数据库?

heroku rake db:migrate

可在此处找到similar question