If you want to talk to the process IO.popen("php <script>") , use IO.popen("php <script>") . Or you can use the backticks option (not so easy with the markup here), which returns the string that the process writes to stdout. If you do not need a connection, system "php <script>" returns true or false wherever the command was executed, and you have no way to communicate further.
If you have unsafe input, use Array#shelljoin to avoid it.
Why not rewrite the script in ruby?
source share