# Rake fails on build server, but not in development

**URL:** <https://www.ruby-forum.com/t/rake-fails-on-build-server-but-not-in-development/79575>\
**Category:** Rails\
**Created:** [March 10, 2006, 6:03pm UTC](https://www.ruby-forum.com/t/rake-fails-on-build-server-but-not-in-development/79575 "2006-03-10T18:03:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lori](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/8dc957/32.png) [@lori](https://www.ruby-forum.com/u/lori)\
**Post date:** [March 10, 2006, 6:03pm UTC](https://www.ruby-forum.com/t/rake-fails-on-build-server-but-not-in-development/79575/1 "2006-03-10T18:03:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lori](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/8dc957/32.png) [@lori](https://www.ruby-forum.com/u/lori)\
**Post date:** [March 10, 2006, 8:42pm UTC](https://www.ruby-forum.com/t/rake-fails-on-build-server-but-not-in-development/79575/2 "2006-03-10T20:42:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lori](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/8dc957/32.png) [@lori](https://www.ruby-forum.com/u/lori)\
**Post date:** [March 11, 2006, 12:19am UTC](https://www.ruby-forum.com/t/rake-fails-on-build-server-but-not-in-development/79575/3 "2006-03-11T00:19:13Z")

</div>

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?
