Problems with rake db:schema:dump and Ruby 1.8.5

Hi,

I've got a couple of development machines, and on one of them I recently updated Ruby to 1.8.5 (the other's on 1.8.4), then rebuilt gems and installed rails etc etc.

Apart from that the two machines are identical, and my apps work fine on each.

However, I'm working on a new app, and was trying to run some unit tests on the machine with Ruby 1.8.5, and noticed that even though the test db was there it was bailing with errors about undefined relationships.

So I ran rake db:test:prepare, and still had problems until I noticed that db/schema.rb is empty except for:

    # This file is autogenerated. Instead of editing this file, please use the     # migrations feature of ActiveRecord to incrementally modify your database, and     # then regenerate this schema definition.

    ActiveRecord::Schema.define(:version => 14) do

    end

This doesn't happen on the machine running Ruby 1.8.4. Is this a known bug and is there a workaround? Can't find anything online.

TIA

mezza

Oh, and just to provide some more info, calling the rake task with -- trace on both machines produces the identical output below:

** Invoke db:schema:dump (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:schema:dump Loaded suite /usr/local/bin/rake Started

Finished in XXXXXX seconds.

One more update. The problem is _not_ with Ruby 1.8.5, but with the Postgres gem I think. It turned out that the other difference between the two development boxes is the version of Postgres (8.2.1 on the broken one, 8.1.0 on the other).

Pointing to the database on the broken box from the working one reproduces the issue on that box.