I am trying to set up my Env to use PostgreSQL with Rails and i followed the steps to install PostgreSQL from this Article
Am getting the following error
ATAL: database "myapp_development" does not exist Extracted source (around line #661):
rescue ::PG::Error => error
if error.message.include?("does not exist")
raise ActiveRecord::NoDatabaseError.new(error.message, error)
else
raise
end
Did you run rake db:create
and rake db:migrate
before rails server
?
Here's all the steps you should do:
cd /your/app/path
bundle install
bundle exec rake db:create
bundle exec rake db:migrate
bundle exec rails server
Run
rails db:create
before running
rails db:migrate
You can also create PostgreSQL database manually by using psql command prompt.
When in there, connect to your local server and write "create database myapp_development;" without the quotes
I was having a similar problem. I checked different websites and tried what they suggested but didn't work. Then I tried rake db:create:all
and rake db:migrate
it worked for me. Thank you!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With