Setup a PostgreSQL Database

johnmuhl edited this page Aug 24, 2010 · 1 revision
Clone this wiki locally

First, you need to install postgres gem

sudo gem install postgres

If you installed postgresql on a location other than the default, as when installing via macports on Mac OS X, you need to tell gem where to find it

sudo gem install postgres -- --with-pgsql-include=/opt/local/include/postgresql81 --with-pgsql-lib=/opt/local/lib/postgresql81

The config/database.yml should look something like this

development:
  adapter: postgresql
  database: radiant_dev
  username: <username>
  password: <password>
  host: <hostname or ip address. eg.: localhost>

test:
  adapter: postgresql
  database: radiant_test
  username: <username>
  password: <password>
  host: <hostname or ip address. eg.: localhost>

production:
  adapter: postgresql
  database: radiant_live
  username: <username>
  password: <password>
  host: <hostname or ip address. eg.: localhost>