Rails Tutorial Chapter 7

Asked 2 years ago, Updated 2 years ago, 75 views

Rails tutorial Chapter 7 is over and rails has been able to register without any problems.
heroku open after heroku push encountered a problem.
The http://localhost:3000/ screen was displayed without any problems.
If you type sign up now!

We're sorry, but something wrong. 
If you are the application owner check the logs for more information.

appears.

I checked herokurlogs and picked up a problem.
I'm worried because I don't know exactly what to do.Please tell me a specific solution.

Processing by UsersController #new as HTML 
ActiveRecord::StatementInvalid(PG::UndefinedTable:ERROR:relationship "users" does not exist 
LINE5: 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_attrdefd 
ON a.attrelid=d.adrelid ANDa.attnum=d.adnum 
WHERE a.attrelid='"users'"::regclass 
AND a.attnum>0 AND NOT a.attisdropped 
ORDER BY a.attnum

ruby-on-rails heroku

2022-09-30 21:11

1 Answers

If you run db:migrate and create a table, it will be fixed.

$herokurun rakedb:migrate


2022-09-30 21:11

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.