title: Executing Ruby script from PHP and getting output
body: <p>I have this Ruby script (test.rb):</p>
  
  <pre><code>print "hello"
  </code></pre>
  
  <p>And I have this PHP script (test.php):</p>
  
  <pre><code>$cmd = "ruby test.rb";
  system($cmd);
  </code></pre>
  
  <p>Now I call my PHP script from CLI this way:</p>
  
  <pre><code>php test.php
  </code></pre>
  
  <p>And I get no output (it should print "hello")</p>
  
  <p>Why?</p>