cannot run a ruby script from a python script.

Shawn Bright shawn at skrite.net
Thu Sep 25 15:14:30 CEST 2014


On Wednesday, September 24, 2014 6:57:34 PM UTC-5, Shawn Bright wrote:
> hello all. 
> 
> 
> 
> i have a linux computer that i use to run a GUI (wxGTK) program. In this program, there is a call to run an external ruby script.
> 
> 
> 
> command = "ruby run_my_command.rb &" 
> 
> os.system(command)
> 
> 
> 
> however, when it runs, i get this in the terminal
> 
> sh: 1: ruby: not found
> 
> 
> 
> i had considered that the path to the executable was messed up or somesuch, but when i just run python in the interpreter, it works fine.
> 
> 
> 
> also, i have another computer with identical hardware, same OS, same package versions that it does work on also. This machine is to be a backup. 
> 
> 
> 
> Another note: When i run which ruby i get the path to the ruby executable. If i use that in my code, it will run, however, it will not be able to find any of the modules that i need for the ruby script to import.
> 
> 
> 
> example
> 
> 
> 
> command = "/path/to/ruby run_my_command.rb &" 
> 
> os.system(command) 
> 
> 
> 
> will run the ruby script, but the ruby script will not be able to import any of it's modules.
> 
> 
> 
> 
> 
> thanks for any tips on this.

I tried this with the same results. 
I am executing the GUI program from a terminal. It is a data engine that only really can serve our company so no reason to create menu entries for it and such. 
It did try to execute the ruby code, but could not.

Thanks for your help.



More information about the Python-list mailing list