Ryan Mckenzie wrote:
Hello,
I have a simple web application that executes a .exe program through my
controller. The exe program processes some information and displays an
output on the script/server output. Is it possible to catch this
information from the console and output it back to the user?I have tried the following but it does not seem to work:
puts << system.readlines(separator=$/)
Regards,
McKenzie.
Perhaps the backtick method would work better? I found that system() calls sometimes returned random data at the end of the result.
output = `/path/to/app/to/execute`
puts output
worked a lot better for my case.
HTH
Matt