我之前看到过这个问题,但只是针对 Rspec。我还没有创建测试,因为它对我来说太先进了,但很快有一天我会!校对: P
当我尝试注册/登录到我的应用程序时,我得到了这个错误。我使用设计创建用户,也 Omniauth2登录与 谷歌。
这就是错误
ActiveRecord::StatementInvalid at /users/auth/google_oauth2/callback
PG::UndefinedTable: ERROR: relation "users" does not exist
LINE 5: WHERE a.attrelid = '"users"'::regclass
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
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
我试过 rake db:migrate
,但它已经被创建了: 在模式表中存在用户。以前有人得到过这个错误吗?
Yml
Config =/opt/local/lib/postgreql84/bin/pg _ config
development:
adapter: postgresql
encoding: unicode
database: tt_intraweb_development
pool: 5
username: my_username
password:
test:
adapter: postgresql
encoding: unicode
database: tt_intraweb_test
pool: 5
username: my_username
password:
production:
adapter: postgresql
encoding: unicode
database: tt_intraweb_production
pool: 5
username: my_username
password: