I did install postgresql according to the manual. But as soon as I do rails server I see the above error.
Roelof
Edit 1: the sudo -u postgres createuser roelof did the trick but now when I do rake db:create I see this errror message:
PG::InsufficientPrivilege: ERROR: permission denied to create database
You can create a role with your name by running a
createuser
command as the postgres system user. Run this in a terminal:For PG::InsufficientPrivilege: ERROR: permission denied to create database:
Another way to resolve this problem is going to
psql
and type\du
to list all roles. Make sure your role has the following things:You might want to use this command
psql=# CREATE ROLE roelof SUPERUSER CREATEDB REPLICATION CREATEROLE LOGIN;
to resolve this problem.Next, configure your database.yml:
and if you configured a password, please provide it:
Best wishes.