rake db:create throws “database does not exist” error with postgresql

前端 未结 10 926
忘了有多久
忘了有多久 2021-01-30 19:58

I\'m using rails 4.1.5 with postgresql 9.1 under Debian 7, and I\'m not able to create a database in my development environment. When I run

bin/rake db:create
         


        
10条回答
  •  天涯浪人
    2021-01-30 20:39

    Here is the list of commands I run at each deployment (including the first one)

    //create pids folder if no yet
    mkdir -p tmp/pids
    
    //create dbs if no yet
    bundle exec rake db:create
    
    //run all new migrations
    bundle exec rails db:migrate
    
    //seed db with data if required
    bundle exec rake db:seed
    
    //start the server with config
    bundle exec puma -C config/puma.rb
    

提交回复
热议问题