1

I have a site that works completely correctly locally and when I use git push heroku master it seems to work fine, but then when I actually open up the heroku site in my browser I just get a message "We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly." I have no idea why this might be happening. Can someone please suggest possible reasons for why this might be happening and where I should begin to debug this problem? (Or if you know right off the bat how to solve it that's even better)

Here is my heroku logs file:

$ 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

The only line in the above log file that says "error" in it this:

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

What does this mean though? And is that the cause of the problem?

Kvass
  • 8,294
  • 12
  • 65
  • 108
  • Does that message come from Heroku or from you app? – s.m. Jun 24 '11 at 18:58
  • 1
    Use `heroku logs` on the command line and look at the error.. – halfdan Jun 24 '11 at 19:07
  • So I entered `heroku logs` but I really don't understand any of it and it's massive -- I don't know what to look for. And @s.m., the error appeared when I visited the actual URL of the app (app_name.heroku.com) – Kvass Jun 24 '11 at 19:12
  • @Kvass: I know nothing about Heroku, but you can post the log somewhere like pastebin and edit your question adding a link to it, so someone might be able to help you. – s.m. Jun 24 '11 at 19:14
  • The logs are sequential, go towards the bottom to find the error (probably a stack trace), and then scroll up from there to find the source of the error. Also, you can copy the output to a text file with `$ heroku logs > logfile.txt` – Joshua Cheek Jun 24 '11 at 19:20

1 Answers1

3

Have you migrated your database on the Heroku side?

heroku rake db:migrate

A similar question can be found here.

Community
  • 1
  • 1
xoebus
  • 812
  • 7
  • 18
  • I tried that and ran across a new problem. I use the 'faker' gem for test purposes (in the development environment) and have the line `require 'faker'` in one of my rake files (in the lib/tasks directory). Heroku is having issue with this line, saying it can't find the faker file to load -- how do I resolve this issue? Obviously it can't find the faker gem because that's only in the development group in my gemfile. So what do I do? – Kvass Jun 24 '11 at 19:35
  • After I resolve this problem I should be able to run that command and then see if it solves my initial problem. – Kvass Jun 24 '11 at 19:35
  • @Kvass Unless you have a reason not to you could just move it into the production part of your `Gemfile`. It shouldn't have any adverse affects. – xoebus Jun 24 '11 at 19:36
  • We're getting there. I just did that and then did `heroku rake db:migrate` and the site did load, but then when I tried to use signup and create a new user the same original error message appeared. The signup feature works correctly on my localhost. – Kvass Jun 24 '11 at 19:42
  • Actually I take that back -- the user is signed in correctly, just the show action for the user is not working properly. The rest of the pages are loading fine – Kvass Jun 24 '11 at 19:43
  • @Kvass Is the show user page failing with the same error message? – xoebus Jun 24 '11 at 19:48
  • no it was a syntax error -- I'm just double checking it now to make sure everything is in order – Kvass Jun 24 '11 at 19:56