title: Rails not using Postgres user account
body: <p>I'm using Rails 3.0 and PostgreSQL 8.4 on Ubuntu 10.10 and Ruby 1.9.2p136 with the pg gem. When I run <code>rake db:migrate</code>, I get the error <code>FATAL:  password authentication failed for user "my_os_user_account"</code>, when I actually expected it to log in to the database as my_db_username specified in database.yml.</p>
  
  <p>I have md5 authentication configured in pg_hba.conf for both Unix socket and IP connections and I can log in using <code>psql</code> on the command line. I have also tried setting the authentication to trust. <code>psql</code> then allows me to log in without entering a password, but Rails then gives <code>FATAL:  role "my_os_user_account" does not exist</code>.</p>
  
  <p>Here's database.yml:</p>
  
  <pre><code>development:
    adapter: postgresql
    database: my_project_dev
    user: my_db_username
    password: my_password
    pool: 5
    timeout: 5000
  </code></pre>
  
  <p>with additional near-identical entries for test and production.</p>