title: FATAL: Peer authentication failed for user "rails"
body: <p>I'm trying to run rake <code>db:create</code> with postgresql on a DigitalOcean server.</p>
  
  <p>However, it's returning the error <code>Peer authentication failed for user "rails"</code>, referring to <code>config/database.yml</code> where the credentials to log in are stored</p>
  
  <p>What's strange is that these are the exact credentials displayed to me in plain text when I log into the server through SSH. I've tried both <code>&lt;%= ENV['APP_DATABASE_PASSWORD'] %&gt;</code> and the password displayed to me in plain text and the same thing happens.</p>
  
  <p>The environment is in production, which I have to enforce manually because the app is in development on startup and forcing it to change in <code>config/environments.rb</code> isn't working.</p>
  
  <p>If I had to guess I might say that something funny is happening with the environment, because DigitalOcean will continue to serve a cached version of the site until the server is restarted and it might still think it's in development as far as it's concerned. But I'm in kind of a catch-22 until I figure out how to force it into production on startup.</p>
  
  <p>This question is what I've arrived at after a lot of tribulation with postgres and trying to set up a database on the backend, so I need to be walked through a couple things.</p>
  
  <p>Many thanks.</p>