samedi 27 juin 2015

Postgre error with Rails - I'm running locally but the database won't work properly)

Currently trying to install to run Catarse on my Mac (Yosemite)

When I try and run rake db:create db:migrate db:seed

I get the following message

ActiveRecord::StatementInvalid: PG::DuplicateObject: ERROR:  role "admin" already exists
:     CREATE ROLE admin NOLOGIN;
    -- This script assumes a role postgrest and a role anonymous already created
GRANT usage ON SCHEMA postgrest TO admin;
GRANT usage ON SCHEMA "1" TO admin;
GRANT select, insert ON postgrest.auth TO admin;
GRANT select ON ALL TABLES IN SCHEMA "1" TO admin;
GRANT admin TO postgrest;

I have tried to do the above but to no avail, and now it's saying that I have a duplicate admin role. Can anybody please offer some guidance or assistance?

I've spent most of the day troubleshooting and looking at this over and over again in frustration by doing the following:

Uninstalling catarse Reinstalling and uninstalling postgresql Trying to implement the above 'GRANT' commands

Aucun commentaire:

Enregistrer un commentaire