Exit Wiki

Posgress is a nice database that has (in the past) given us less trouble than MySQL.

Using Progress With Rails (on Ubuntu)

Step 1, install packages and gem

    $ sudo apt-get install postgresql postgresql-client postgresql-server-dev  # (or use Vagrant + Puppet!)
    $ gem install pg  # appears to be the latest postgress gem hotness - RPW 08-01-2011

Step 2: config/database.yml setup

In database.yml, set the adaptors to be "postgresql"

Your entries in database.yml should look like:

development:
  adaptor: postgresql
  database: someproject_development

Because it uses the name of the current logged in user for the username for the DB

Step 3: postgres user

    $ sudo su postgres
    # createuser MY_USER_NAME
    (be a superuser?) (answer yes)

Step 4: Fix encoding issue on Ubuntu 9

Fix: 'new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)' error

Importing data into Postgress

Comments:

Add comments by visiting: Postgres/Comments

Postgres (last edited 2012-03-02 16:40:43 by RyanWilcox)