title: PostgreSQL fe_sendauth: no password supplied
body: <p>I know there are thousands of questsions like this one here on SO but i've seen them all and i'm still not able to deal with my problem.</p>
  
  <p>I'm doing everything using ansible so it's quite automated but, anyway, here are my files:</p>
  
  <h3>pg_hba.conf</h3>
  
  <pre><code>local   all             all                                     trust
  host    all             all             127.0.0.1/32            md5
  host    all             all             ::1/128                 md5
  host    all             all             10.11.12.0/24           md5
  </code></pre>
  
  <h3>database.yml</h3>
  
  <pre><code>production:
    database: my_db
    adapter: postgresql
    host: localhost
    username: deploy
    encoding: unicode
    min_messages: WARNING
    template: template0
  </code></pre>
  
  <p>And i have a <code>deploy</code> user (and postgres user without a password set) in my system created. And now, while i'm totally able to sign in to postgres from bash using <code>psql -d my_db</code> (on server), i'm not able to connect to the db with my rails app. Running rake db:migrateMigration gives me </p>
  
  <pre><code>PG::ConnectionBad: fe_sendauth: no password supplied
  </code></pre>
  
  <p>I'm quite terrible at beeing a devop and i'm fighting with that issue from the day before yesterday's morning and it's still here so if there is anyone who can help me with that, i would be be more than grateful.</p>