From: sto.mar@... Date: 2013-07-23T15:25:22+09:00 Subject: Re: using qsub from Ruby script produces "command not found" Am 23.07.2013 02:22, schrieb Thomas Luedeke: > I am running a script that runs multiple cases on an engineering code. > This engineering code is designed to use the a "qsub" (queueing system) > command. > > The problem I get when trying to issue a "qsub run.sh" file (where > "run.sh" is the UNIX script interfacing the engineering code, Ruby > always terminates with a "command not found" on the qsub. > > I've tried everything I can think of, including explicit pathways to the > qsub executable and the run.sh input. I've tried both the system( "qsub > run.sh" ) and `qsub run.sh` methods of running it. > > What is going on? If I do a UNIX command line "qsub run.sh", it runs > fine. If I do exactly the same thing within Ruby as a system command, > it fails. > Is the path where qsub is located in the search path of the shell actually used by the Ruby system command? Have a look at: system("echo $PATH") (Different paths compared to your command line might be a login / non-login / interactive shell issue.) And how exactly did the command with explicit paths look like? (It's difficult to locate an error without seeing the used code.) Regards, Marcus --