Postgres on Rails FATAL: database does not exist

橙三吉。 提交于 2019-11-30 02:56:44

I was having a similar problem. I checked different websites and tried what they suggested but didn't work. Then I tried what you suggested. rake db:create:all and rake db:migrate it worked for me. Thank you!

You need to create the databases first. Run rake db:create:all

Also make sure your yml file is set up correctly for postgres.

db:create:all and db:migrate did not work for me first. I changed my database name from development.pg to developmentpg in myapp/config/database.yml file:

database: db/developmentpg

and then rake db:create:all and rake db:migrate, it worked for me.

Thank you

I tried running rake db:create:all, which didn't work. However, running bundle exec rake db:create:all worked for me.

Hope this helps!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!