KevinBongart / cards_against_humanity

An unofficial online version of the Cards Against Humanity game.
https://www.cardiganshumility.online
Other
41 stars 13 forks source link

Ubuntu 20.04 create DB errors. #70

Closed jeffreyporter closed 4 years ago

jeffreyporter commented 4 years ago

I have installed Postgres on my local ubuntu box via these instructions. https://help.ubuntu.com/community/PostgreSQL

I am now at this command.. "bundle exec rails db:create db:migrate db:seed"

I get the following error...

jp@DESKTOP-L4S9AIU:/app/cards_against_humanity$ bundle exec rails db:create db:migrate db:seed FATAL: role "jp" does not exist Couldn't create 'cards_against_humanity_development' database. Please check your configuration. rails aborted! PG::ConnectionBad: FATAL: role "jp" does not exist bin/rails:9:in

' Tasks: TOP => db:create (See full trace by running task with --trace)`

Any advice?

jp is my local user.

jeffreyporter commented 4 years ago

sudo su su postgres createuser -s --username=postgres jp

"Use the operating system user postgres to create your database - as long as you haven't set up a database role with the necessary privileges that corresponds to your operating system user of the same name"