title: Execute and capture the results in the terminal of a ruby file using php
body: <p>I have added php script to run my ruby file but to no success. I run my php script in its php directory. </p>
  
  <pre><code>$command = "ruby /home/user/ruby-grok/examples/result.rb";
  $out = shell_exec($command);
  </code></pre>
  
  <p>It does not display the results of the ruby file. But when I run the command outside php it works. </p>
  
  <p>Expected result is to display information in the terminal and write the results to a file.</p>