ruby on rails - ActiveRecord::StatementInvalid: PG::InsufficientPrivilege: ERROR: permission denied for relation schema_migrations -
i have local project, rails , postgres. threw on aws amazon linux ami. have run test projects rails , postgres on server. when uploaded local project, , try run
rake db:migrate
i following error:
activerecord::statementinvalid: pg::insufficientprivilege: error: permission denied relation schema_migrations
i saw similar issues, none of them help. have proper role setup , connected.
i'm not sure if you're running rake db:migrate
rails_env
production or development. whichever (development default), in config/database.yml user, password, , database running on. user must have all
privileges on public.schema_migrations
table. if does, , it's still not working, make sure user has privileges on public
schema.
read more manipulating postgres database privileges here. postgres has excellent documentation.
one more thing: if you're creating database locally, , trying create initial database instead of running migration, use rake db:schema:load
instead of rake db:migrate
. never run on production, delete data!
Comments
Post a Comment