-1

So I just deployed an app to heroku. It has two root pages, one for once the user is authenticated and the other for any person who visits the site. The homepage loads fine, but after logging in, once the app is directed to the "authenticated root" I get the dreaded "We're sorry, but something went wrong" page.

Any ideas on why this might be happening? Could it be an issue with Devise authentication?

Here's the first error from heroku logs

ActionView::Template::Error (PG::Error: ERROR:  relation "polls" does not exist

polls being a model in this app.

Keith Johnson
  • 730
  • 2
  • 9
  • 19
  • check this http://stackoverflow.com/questions/5450930/heroku-postgres-error-pgerror-error-relation-organizations-does-not-exist – sites Jun 14 '13 at 01:22

2 Answers2

1

You have to run heroku run rake db:migrate after your deployments to migrate your database. Heroku does NOT run it as part of deployments.

John Beynon
  • 37,398
  • 8
  • 88
  • 97
0

Another issue was when I ran a git status I had a list of all the erb templates that I had staged for deletion but hadn't manually remove. For some reason, heroku was trying to render these views and not the HAML ones. After I did git rm it worked.

Keith Johnson
  • 730
  • 2
  • 9
  • 19