This is how my database.yml file looks (obviously there are relevant entries for testing and production as well)
development:
adapter: postgresql
encodin
Database.yml:
connection: &connection
adapter: postgresql
encoding: unicode
pool: 5
username: username
password: tehpass
development:
<<: *connection
database: dbname_development
test:
<<: *connection
database: dbname_test
production:
<<: *connection
database: dbname_production
If this is not working for you then, there might be something wrong during installation.
Visit this blog, hope this might help you out.
EDIT
ERROR CASE:
e_sendauth: no password supplied
fe_sendauth: no password supplied
This happens under a stock Ubuntu install, and is due to the permissions in pg_hba.conf being too restrictive by default. To allow rails to connect, simply change the bottom of pg_hba.conf to look like this.
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
Let me know if this helps or not?