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.
How are you running the command from shell? As root?
Sincerely,
Maxim Doumkine
···
On Jul 22, 2013, at 20:22, Thomas Luedeke <lists@ruby-forum.com> wrote:
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.
At the UNIX command line, I simply type "qsub run.sh", and it will use
the run.sh from the submission directory. I have /usr/local/bin in my
UNIX PATH specification.
In Ruby, I've tried explicitly including the pathway on the qsub, to no
avail.
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
···
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.