Role does not exist and unable to create database when using PostgreSQL

后端 未结 3 2087
鱼传尺愫
鱼传尺愫 2020-12-07 07:45

I am using Heroku for my application and it requires PostgreSQL but you can still use SQLite3 for development. Since Heroku strongly advised against having 2 different datab

3条回答
  •  春和景丽
    2020-12-07 08:31

    If you have a specific account/user on your machine for postgres called postgres for example.

    Then executing this command will bring a prompt for you to enter a role name.

    sudo -u postgres createuser --interactive
    

    Then doing

    rake db:create
    

    Should work!

提交回复
热议问题