# Strange behavior of Kernel::system

**URL:** <https://www.ruby-forum.com/t/strange-behavior-of-kernel-system/132350>\
**Category:** Ruby\
**Created:** [March 19, 2008, 11:20am UTC](https://www.ruby-forum.com/t/strange-behavior-of-kernel-system/132350 "2008-03-19T11:20:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![phil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/e95f7d/32.png) [@phil](https://www.ruby-forum.com/u/phil)\
**Post date:** [March 19, 2008, 11:20am UTC](https://www.ruby-forum.com/t/strange-behavior-of-kernel-system/132350/1 "2008-03-19T11:20:49Z")

</div>

Hi

I am running Ruby on Ubunutu 7.10. I have a shell script building my  
software (doFullBuild) with one Parameter (the SVN revision number).

When I call this script directly from Linux terminal (e.g. ./  
doFullBuild -r 134 \>logFile\_r134.log 2\>logFile\_r134.error.log &) it  
checks out the SW sources and builds the software - and everything is  
fine.

I now enhanced my build system by using Ruby (and Fox-GUI library).  
There in the Ruby script I have:  
system(’./doFullBuild -r 134 \>logFile\_r134.log  
2\>logFile\_r134.error.log &’)  
This should do exactly the same as when I run it directly from Linux  
terminal - shouldn’t it? BUT - it does not and I need help about how I  
can further analyze this problem.  
Some parts are not built and I have no idea what is the difference  
between calling doFullBuild directly in Linux terminal or by calling  
it (via system) from my Ruby script.

Any hints for me?

BR Phil

---

<div class="post-metadata">

**Author:** ![phil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/e95f7d/32.png) [@phil](https://www.ruby-forum.com/u/phil)\
**Post date:** [March 31, 2008, 9:10am UTC](https://www.ruby-forum.com/t/strange-behavior-of-kernel-system/132350/2 "2008-03-31T09:10:54Z")

</div>

I have found a problem in the bash script (empty command, i.e. “:” and  
next line being interpreted as options for this command) being called  
by my Ruby script. Still I do not understand why there is a difference  
between calling the bash script from a Linux terminal window and  
calling it from within Ruby.

But what I had to solve is solved.

BR Phil
