Rake fails on build server, but not in development


#1

I’m working in a development environment of Mac OS X with MySQL, and a
production deployment environment of Redhat with Oracle XE. In the
course of setting up a new continuous build server that more closely
mimics our production environment, I got stuck on the following
strangeness on the build server (Linux, Oracle).

  1. rake fails
  2. rake test_units works
  3. rake test_functional works

We’ve reduced the problem down to a simple fault by using --trace … I
can see that “purge_test_database” does not happen between test_units
and test_functional when a complete rake is done, and the database has a
bunch of stuff in it from the unit tests, so it is not blank to start
for the functional tests.

So, I am confused. We have a complete match of Ruby and Gem versions
between development and build. Why is this behaving so differently? Is
this a platform difference (Mac vs Linux) or a database difference
(MySQL vs Oracle)?

I’m sure there is probably a simple work-around, but where should I
start?

Lori


#2

Lori O. wrote:

I’m sure there is probably a simple work-around, but where should I
start?

Ok, I think I know what needs to be done, I just can’t seem to make it
work. For my Rails application, when I go “rake”, it executes a
“default” task (which seems to come from a Rails file called misc.rake),
which in turn invokes the “test_units” and “test_functional” tasks.

What I need to do is to override that “default” task, and make it invoke
the “purge_test_database” task in between the invocations of
“test_units” and “test_functional”.

I’ve tried creating a myapp.rake file under lib/tasks, with a “default”
task, but it does not get called when I do a “rake”.

What am I doing wrong?

Lori


#3

Lori O. wrote:

So, I am confused. We have a complete match of Ruby and Gem versions
between development and build. Why is this behaving so differently? Is
this a platform difference (Mac vs Linux) or a database difference
(MySQL vs Oracle)?

Continuing to narrow this down. Running from a Mac against the Oracle
on the Linux machine… and rake fails. Running from a Mac against the
same version of Oracle on a Windows machine… and rake works.

So it seems to be an “Oracle on Linux” problem.

Is anyone else running with Oracle XE on Linux having rake problems?