I am trying to run rake db:create with postgresql on a DigitalOcean server.
However, it returns a Peer authentication failed for user "rails" error, citing config/database.yml , where login credentials are stored
What is strange is that these are the exact credentials displayed to me in plain text when entering the server through SSH. I tried both <%= ENV['APP_DATABASE_PASSWORD'] %> and the password displayed to me in text form, and the same thing happens.
The environment is in production, which I have to force manually, because the application is under development at startup and the forced change in config/environments.rb does not work.
If I had to guess, I could say that something funny is happening to the environment, because DigitalOcean will continue to maintain the cached version of the site until the server restarts and, perhaps, But I'm in trick-22 until I find out how to make it run at startup.
This question is what I came to after a lot of trouble with postgres and trying to create a database on the backend, so I need to go through a couple of things.
Thank you very much.
source share