I'm running a rails app on docker-compose image. After I created a user devise, when I run docker-compose run web rails db:migrate
it shows the following error: PG::ConnectionBad: FATAL: could not open relation mapping file "global/pg_filenode.map": Permission denied
I have tried all the solutions rails and psql related, so I'm guessing my problem is with the docker-compose program somehow, I also tried with sudo
but the result is the same
Code:
The command I run is docker-compose run web rails db:migrate
after docker-compose run web rails g devise usuario
and this is the output:
rails aborted!
PG::ConnectionBad: FATAL: could not open relation mapping file "global/pg_filenode.map": Permission denied
/usr/local/bundle/gems/pg-1.1.4/lib/pg.rb:56:in `initialize'
/usr/local/bundle/gems/pg-1.1.4/lib/pg.rb:56:in `new'
/usr/local/bundle/gems/pg-1.1.4/lib/pg.rb:56:in `connect'
Rest of the log in this link: https://hastebin.com/axiboxohem.bash