Howdy.
I am trying to launch an external shell process from my Rails app using
IO.popen.
The process runs just fine when I am logged in as the user from the
shell
but when I run it from Rails, the task doesn’t run properly and the
output
is too truncated to see any errors.
Anything special I need to worry about when running shell tasks this
way?
I have code like the following:
logger.debug(“Command String: #{command_string}”)
pipe = IO.popen(command_string, “w+”)
if pipe
@tmailer_out = pipe.readlines
end
logger.debug(“Mailer Out: #{@tmailer_out}”)
So, running ‘command_string’ in the shell as the user ‘mongrel’, it
works
fine. But the above only produces about 3 characters of output.
Any help is appreciated.
Hunter