I'm trying to deploy my Rails app to Heroku, and I now want to load my schema. I get the following error:
Running `bundle exec rake db:schema:load` attached to terminal... up, run.1533
rake aborted!
PG::ConnectionBad: FATAL: permission denied for database "postgres"
DETAIL: User does not have CONNECT privilege.
Which is weird because postgres
is not the database it should connect to. The database URL, which is available to the app via ENV, has the right values, and the long apparently random name d3kwlkwlwjwljetc...
.
Searching for this message gives me people who are trying to drop or reset the DB, which is not what I'm doing.
- I have 0 rows
- I tried
pg:reset
, even removed and put back the database. No avail. - I'm not doing
db:drop
, justdb:schema:load
I'm dumbfounded. Why can't my app connect?
Edit: Apparently, I can't schema:load
, but I can migrate all my migrations over. Why is that?