# Weird rake problem - RHEL4 versus Ubuntu 7.04

**URL:** <https://www.ruby-forum.com/t/weird-rake-problem-rhel4-versus-ubuntu-7-04/115731>\
**Category:** Rails\
**Created:** [September 28, 2007, 12:50am UTC](https://www.ruby-forum.com/t/weird-rake-problem-rhel4-versus-ubuntu-7-04/115731 "2007-09-28T00:50:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bnab](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/7ea924/32.png) [@bnab](https://www.ruby-forum.com/u/bnab)\
**Post date:** [September 28, 2007, 12:50am UTC](https://www.ruby-forum.com/t/weird-rake-problem-rhel4-versus-ubuntu-7-04/115731/1 "2007-09-28T00:50:31Z")

</div>

## I stumbled on a rake problem while using CruiseControl.rb. I think the issue is more specific to rake though, so I’m posting about it here.

I’ve added a project to cc.rb, and modified the config script so that it  
runs a shell script that contains the following:

#! /bin/sh  
rake RAILS\_ENV=test db:migrate  
rake RAILS\_ENV=test test

Here’s my problem. To set the scene, I’m intentionally making a test  
fail for the time being.

When I run that script on the Ubuntu machine, and then do a ‘echo $?’, I  
receive an ‘1’ as a response… aka an error code, which is to my way of  
thinking, correct… and ends up making the cruise control build fail,  
which is what I want.

When I do that exact same thing on the Red Hat machine, the rake test  
fails, but then when I do the ‘echo $?’, I receive a ‘0’ response code  
instead of the ‘1’. This then indicates to cruise control that the  
build was good, which is not correct.

Any ideas?

---

<div class="post-metadata">

**Author:** ![bnab](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/7ea924/32.png) [@bnab](https://www.ruby-forum.com/u/bnab)\
**Post date:** [September 28, 2007, 5:43pm UTC](https://www.ruby-forum.com/t/weird-rake-problem-rhel4-versus-ubuntu-7-04/115731/2 "2007-09-28T17:43:40Z")

</div>

The cause of this problem was identified by someone over on the  
cruisecontrol.rb list.

[http://www.nabble.com/weird-problem---RHEL4-versus-Ubuntu-7.04-tf4531351.html](http://www.nabble.com/weird-problem---RHEL4-versus-Ubuntu-7.04-tf4531351.html)
