[Ruby] Launching script/runner from within Rails
Mike Mondragon
mikemondragon at gmail.com
Fri Feb 9 13:58:48 PST 2007
I couldn't get rmagick to install onto a FreeBSD box so I just use the
real Image Magic composite program to process an image. Page 141 of
the PickAxe book shows an exec/wait example for long running processes
and that's what I use. The output still goes to standard out. How
would I control output of the long running process in such a way as
the back tick style? Or is there a way to wait on a subprocess spun
from the back tick?
wm="/usr/bin/composite -gravity southeast -watermark 25 #{wmimg}
#{inimg} #{outimg}"
exec(wm) if fork.nil?
Process.wait
More information about the Ruby
mailing list