I am using Rails 3.0 and PostgreSQL 8.4 on Ubuntu 10.10 and Ruby 1.9.2p136 with pg gem. When I run rake db:migrate, I get an error FATAL: password authentication failed for user "my_os_user_account"when I really expected it to go into the database as my_db_username set in database.yml.
I have md5 authentication configured in pg_hba.conf for both Unix sockets and IP connections, and I can log in using psqlthe command line. I also tried setting up authentication for trust. psqlthen allows me to log in without entering a password, but Rails then gives FATAL: role "my_os_user_account" does not exist.
Here is database.yml:
development:
adapter: postgresql
database: my_project_dev
user: my_db_username
password: my_password
pool: 5
timeout: 5000
with additional almost identical elements for testing and production.