http://pragtob.wordpress.com/2012/09/12/setting-up-postgresql-for-ruby-on-rails-on-linux/
sudo apt-get install postgresql
tobi@speedy ~ $ sudo su postgres
[sudo] password for tobi:
postgres@speedy /home/tobi $ createuser tobi(substitute with your username)
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) n
development:
adapter: postgresql
database: ArbitaryDatabaseName
pool: 5
timeout: 5000
psql: fe_sendauth: no password supplied
- Edit /etc/postgresql/9.1/main/pg_hba.conf and set authentication method to Trust
local all all trust
host all all 127.0.0.1/32 trust
host all all ::1/128 trust
- Restart PostgreSQL
sudo /etc/init.d/postgresql restart