2.0.2 Postgres don't work

Do you have postgres or postgresql as the adapter name in your database.yml file?

The postgresql adapter (which is the proper name) is one of the remaining standard adapters stlll included with ActiveRecord-2.0.x

There is no gem.

All I can think of is to ask Robby Russell, he usually keeps track of issues in Rails vs Postgresql:

http://www.robbyonrails.com/

f

I set up my current project under Rails 1.x and haven't changed the database.yml for rails 2.0.2. Here's an excerpt. It still works. I guess the older gems mentioned in the comments should still work, if you want to try them.

I'm using postgresql 8.2.5 on winxp. And another version on Linux.

# PostgreSQL versions 7.4 - 8.1

I'm assuming that this was in response to my query about what the OP had in his database.yml.

To be clear about what I was suggesting:

Here's his error: usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:231:in `establish_connection': Please install the postgres adapter: `gem install activerecord-postgres-adapter` (no such file to load -- active_record/connection_adapters/postgres_adapter)

Note that it's asking for the postgres_adapter NOT the postgreslq_adapter. The postgres in that name is coming from the adapter specificed in database.yml.

The way ActiveRecord::Base works is like this.

  1) It ensures that an adapter WAS in fact specified in the configuration (i.e. database.yml)   2) It sets up the gem environment   3) It then does this:

            begin               require "active_record/connection_adapters/#{spec[:adapter]}_adapter"             rescue LoadError               raise "Please install the #{spec[:adapter]} adapter: `gem install activerecord-#{spec[:adapter]}-adapter` (#{$!})"             end

The gems are actually a fall back if the adapter isn't a standard part of active-record. here are the relevant 'built-in' database adapters:

   activerecord/connection_adapters/mysql_adapter.rb    activerecord/connection_adapters/postgresql_adapter.rb    activerecord/connection_adapters/sqlite3_adapter.rb    activerecord/connection_adapters/sqlite_adapter.rb

So as I see it, I suspect that the OP has

   adapter: postgres

instead of

  adapter: postgresql

in his configuration

So it's looking for a gem which has the fictitious postgres_adapter. Note that these adapter gems are ActiveRecord connection adapters, not database gems which might be required for ruby support of the database in question.