Download and install

This will automatically create a postgres user with the name of your machine (i.e. jrasmusson).

Add the ‘pg’ gem to your project.

gem ‘pg’

$ bundle install (or)
$ gem install pg

Remove any old pg gems that might interfere:

$ gem list
$ gem cleanup pg

Check that pg installed correctly and that nothing was already running on port 5432.
$ netstat -anp tcp | grep 5432

Then update your database.yml to use the new username created.

  adapter: postgresql
  host: localhost
  encoding: unicode
  database: nutshell_development
  pool: 5
  username: jrasmusson

Then configure databases:

$ rake db:create:all

Links that help

Connecting with pgadmin


Trouble shooting

psql: FATAL: database “user” does not exist
$ createdb