Error in migrating the Postgres database

I want to create a rails application using postgres database.
Update a username and password terp and agile respectively.
When i run the command rake db:create and rake db:migrate
it is giving mi an error…

uninitialized constant
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::PGconn

Please tell me how to resolve this error…

Hope u have the postgre adapter installed.

Hello sir,

I have installed

gem to install is ruby-pg

gem to install is postgres

gem to install is postgres-pr

But still getting the same error…
uninitialized constant
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::PGconn

Is there any configuration needed for the postgreSQLAdapter…
Please tell me how to resolve this error…

put in config/environment.rb this string:

config.gem “postgres”

or another gem which you use

On Ubuntu 9.10 I solved same error by installing libpgsql-ruby:
sudo aptitude install libpgsql-ruby