views:

38

answers:

1

Making good progress on rails now, but hit a snag on heroku deployment. After committing to git and then doing git push heroku master, I've gotten an error twice in the heroku logs when I try and open /users/sign_up

Started GET "/users/sign_up" for 12.123.234.345 at Mon Sep 20 14:39:05 -0700 2010
  Processing by Devise::RegistrationsController#new as HTML
Completed   in 3ms

ActiveRecord::StatementInvalid (PGError: ERROR:  relation "users" does not exist
:             SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
              FROM pg_attribute a LEFT JOIN pg_attrdef d
                ON a.attrelid = d.adrelid AND a.attnum = d.adnum
             WHERE a.attrelid = '"users"'::regclass
               AND a.attnum > 0 AND NOT a.attisdropped
             ORDER BY a.attnum
):

What's annoying me is some combination of restarting the app server on heroku, and doing heroku db:reset fixed it the first time, but I cannot now replicate what it was that fixed it. The error above sounds like it hasn't migrated the users table properly.

Help appreciated!

A: 

Your database on Heroku was probably empty. Did you migrate the database on Heroku after you deployed? If not it's just an empty database.

db:push solved your problem because you pushed your development database over top of the empty one, so it started working.

tfe