J'ai un site qui fonctionne complètement correctement localement et quand j'utilise git push heroku master
il semble bien fonctionner, mais quand j'ouvre le site heroku dans mon navigateur, je reçois juste un message "Nous" Je suis désolé, mais quelque chose s'est mal passé ... Nous avons été informés de ce problème et nous y reviendrons sous peu. " Je ne sais pas pourquoi cela pourrait se produire. Quelqu'un peut-il s'il vous plaît suggérer des raisons possibles pour lesquelles cela pourrait se produire et où je devrais commencer à déboguer ce problème? (Ou si vous savez dès le départ comment résoudre c'est encore mieux)Heroku - site ne fonctionne pas
Voici mon fichier 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 [email protected]
yahoo.com
←[35m2011-06-24T18:50:32+00:00 heroku[api]:←[0m Release v6 created by danidickst
[email protected]
←[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
La seule ligne dans le fichier journal ci-dessus qui dit « erreur » en elle cette :
←[36m2011-06-24T18:50:52+00:00 app[web.1]:←[0m ActionView::Template::Error (PGEr
ror: ERROR: relation "users" does not exist
Qu'est-ce que cela signifie cependant? Et est-ce la cause du problème?
Est-ce que ce message provient de Heroku ou de votre application? –
Utilisez 'heroku logs' sur la ligne de commande et regardez l'erreur .. – halfdan
J'ai donc entré' heroku logs' mais je ne comprends vraiment rien de tout cela et c'est énorme - je ne sais pas quoi chercher. Et @sm, l'erreur est apparue quand j'ai visité l'URL réelle de l'application (app_name.heroku.com) – Kvass