I've ran into a problem in which I'm not sure how to get out of this. Working on creating a rails view, and after populating my view and editing my controller, i've ran into an error that states PG::UndefinedTable: ERROR: relation 'caves' does not exist
Looking into what I did, I realized that I created my model as cafe
but when I populated my schema tables, I accidentally created a table called caves
instead of cafes
.
Here's what I did to try to resolve this.
caves
to cafes
-- still ran into the same errorcafe
- still ran into the same errorrake db:reset
only to come into a new error telling me ActiveRecord::StatementInvalid: PG::ObjectInUse: ERROR: database "cafe_database" is being accessed by other users
sudo service postgresql restart
....but my machine doesn't recognize service
Does anybody have an idea what I can do to figure this problem out? I'm running out of ideas.
try below steps:
1. rake db:drop
2. rake db:create
3. rake db:migrate
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments