首先安装一个gem gem 'pg'
然后在database.yml中如下
default: &default
adapter: postgresql
pool: 64
timeout: 5000
encoding: utf-8
#
# PRODUCTION
#
production:
<<: *default
database: dc-form
#
# Development specific
#
development:
<<: *default
database: dc-forum
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: dcforum-test