I have a PHP based application and need to call a automation script written in Ruby. I don’t want to have to rewrite the ruby script in PHP and they don’t need to share variables. The Ruby script has gem dependencies, which aren’t resolved when the script is called from system(). How can I make the ruby script see the dependencies from within the system() call?
example:
system('/usr/bin/ruby /www/myscript.rb')
Set the GEM_HOME variable in the
system()callexample: