I have this Ruby script (test.rb):
print \"hello\"
And I have this PHP script (test.php):
$cmd = \"ruby test.rb\"; system($
system would capture the output of the ruby script.
you might want to do:
$cmd = "ruby test.rb"; echo system($cmd);
Its working for me, check whether both ruby script and php in the same folder and installed ruby in your machine
<?php $cmd = "ruby test.rb"; system($cmd); ?>