# Problems with rake db:schema:dump and Ruby 1.8.5

**URL:** <https://www.ruby-forum.com/t/problems-with-rake-dbdump-and-ruby-1-8-5/87273>\
**Category:** Rails\
**Created:** [March 1, 2007, 12:10pm UTC](https://www.ruby-forum.com/t/problems-with-rake-dbdump-and-ruby-1-8-5/87273 "2007-03-01T12:10:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mezza](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/43a26b/32.png) [@mezza](https://www.ruby-forum.com/u/mezza)\
**Post date:** [March 1, 2007, 12:10pm UTC](https://www.ruby-forum.com/t/problems-with-rake-dbdump-and-ruby-1-8-5/87273/1 "2007-03-01T12:10:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mezza](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/43a26b/32.png) [@mezza](https://www.ruby-forum.com/u/mezza)\
**Post date:** [March 1, 2007, 12:43pm UTC](https://www.ruby-forum.com/t/problems-with-rake-dbdump-and-ruby-1-8-5/87273/2 "2007-03-01T12:43:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mezza](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/43a26b/32.png) [@mezza](https://www.ruby-forum.com/u/mezza)\
**Post date:** [March 1, 2007, 1:39pm UTC](https://www.ruby-forum.com/t/problems-with-rake-dbdump-and-ruby-1-8-5/87273/3 "2007-03-01T13:39:19Z")

</div>

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.
