Amo Wu
Amo Wu

Reputation: 2517

Why can't I execute system("xxx.Py -yyy -zzz...") on Ruby?

My OS is Win7

I have a python file(xxx.py), and I need execute it on ruby

my ruby code:

system("xxx.py -yyy -zzz");

and run it no result, but it can run on cmd(xxx.py -yyy -zzz)

and ruby can run system("java -h"); or system("python -h"); success.

What's problem with me???

Upvotes: 4

Views: 882

Answers (1)

Jakob Bowyer
Jakob Bowyer

Reputation: 34698

Just to fill out Dogberts answer in full

Using system("python xxx.py -yyy -zzz") should prrovide you with what you want. This is because your python script is probably not +777 or is missing its shebang line.

Upvotes: 4

Related Questions