开发者

Heroku logs show sql error after deployment

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.adn开发者_如何学Goum
             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!


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜