You could have postgres installed on localhost with password (or without user or password seted after instalation) but if we are developing we really don't need password, so configuring postgres server without password for all your rails project is usefull.
- postgresql
- postgresql-client
- libpq-dev
/Gemfile
gem 'pg'
-
Open postgres configuration file from the console
sudo gedit /etc/postgresql/POSTGRE_VERSION/main/pg_hba.conf
-
Change all local configuration access to:
local all postgres trust
-
Restart postgres server
sudo /etc/init.d/postgresql restart
-
Enjoy :)