I'm using Ubuntu version 15.10. After I type rails s
in the terminal to start a Ruby app and navigate to 0.0.0.0:3000
, I get the following error on the web page:
ActiveRecord::NoDatabaseError at /
FATAL: database "local-election_development" does not exist Run
$ bin/rake db:create db:migrate
to create your database
When I type bin/rake db:create db:migrate
from the terminal, I get this error:
PG::InsufficientPrivilege: ERROR: permission denied to create database
I found this answer, but I did not know how to execute the command ALTER USER new_user CREATEDB;
.
How can I solve this error?