<p>I had the following problem when deploying to production with capistrano</p>
<p>Capistrano postgresql: FATAL: Peer authentication failed for user</p>
<p>The fix was to add a host field under production for Postgres in config/database.yml</p>
<p>So if your database is on the same server then add:</p>
host: yourDatabaseServerIP