Here are the steps I followed:
Install PostgreSQL and development package
	$ sudo apt-get install postgresql-9.1
	$ sudo apt-get install libpq-devSet up a user that is the same as my Ubuntu log-in
$ sudo su postgres -c psql
postgres=# CREATE ROLE <username> SUPERUSER LOGIN;
postgres=# \q
Modify GemfileRemove gem ‘sqlite3’
gem ‘pg’ Modify database.yml in app directory
development:
  adapter: postgresql
  encoding: unicode
  database: appname_development
  pool: 5
  timeout: 5000
  username: <username>
  password:
test:
  adapter: postgresql
  encoding: unicode
  database: appname_test
  pool: 5
  timeout: 5000
  username: <username>
  password:
Run bundle install
$ bundle install Create databases and migrations
$ rake db:create:all $ rake db:migrate </code>