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

前端 未结 10 895
忘了有多久
忘了有多久 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:43

    I see two issues, as is04 pointed out you probably need at least a username value in your database.yml.

    You also need to create the postgres role:

    su - postgres
    create role direct-dev with createdb login password 'password1'
    

提交回复
热议问题