I am unable to use rails with postgres. The database wont create:
sayth@sayth-TravelMate-5740G:~/testapp2$ rake db:create:all
PG::InsufficientPrivilege: ERROR:
Add this using during gitlab_ci DB setup. I solve the problem as described by @Audrius Meškauskas
on Ubuntu 12.04
:
sudo -u postgres psql -d template1
ALTER ROLE gitlab_ci WITH CREATEDB;
sudo -u gitlab_ci -H bundle exec rake db:setup RAILS_ENV=production
The username / password you use lack the administrator rights that are necessary for creation users and databases.
Login as administrator and fix the permissions. If you have administrator login credentials, login and use ALTER ROLE to fix the rights on that account.