Search code examples
ruby-on-railspostgresqlruby-on-rails-4

Rails - FATAL: database "myapp_development" does not exist


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

Solution

  • Did you run rake db:create and rake db:migrate before rails server?

    UPDATE

    Here's all the steps you should do:

    1. cd /your/app/path
    2. bundle install
    3. bundle exec rake db:create
    4. bundle exec rake db:migrate
    5. bundle exec rails server