From: Luke Cowell Date: 2009-07-17T00:00:40+09:00 Subject: Re: problem executing bash script from ruby 1) I googled: exist status 127 - here's the response: If a command is not found, the child process created to execute it returns a status of 127. I think you should try specifying the absolute path of the shell script. 2) If you want to capture the output of your command, you should use the %x{} notation or the `` notation. c = %x{pwd} is equivalent to: c = `pwd` the system command differs from these in that it output the results to stdout and any assignments just contain true or false depending on the exit status. That would be useful if you wanted to run a script and cared only about whether the script was successful or not. a = system("pwd") puts a 0 check out: http://www.ruby-doc.org/core/classes/Kernel.html#M005971 Here's another example summarizing what I've described here. You'd probably do well to open irb and type the commands out individually. lukebook:~ lukec$ irb irb(main):001:0> a = `pwd` => "/Users/lukec\n" irb(main):002:0> puts a /Users/lukec => nil irb(main):003:0> a.upcase => "/USERS/LUKEC\n" Luke -- Posted via http://www.ruby-forum.com/.