Forum: Ruby on Rails Problems with rake db:schema:dump and Ruby 1.8.5

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
mezza (Guest)
on 2007-03-01 13:10
(Received via mailing list)
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
mezza (Guest)
on 2007-03-01 13:43
(Received via mailing list)
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.
mezza (Guest)
on 2007-03-01 14:39
(Received via mailing list)
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.
This topic is locked and can not be replied to.