On Apr 8, 2008, at 1:52 PM, Tim Hunter wrote:
> Alex Wayne wrote:
>> So it looks the block passed to popen isnt even getting called  
>> until the command that it invokes exits.  Then the variable passed  
>> into the block is the entire output of that command?
>
> It seems possible that there is some buffering going on. Perhaps  
> somebody else will have a better idea.
>
> -- 
> RMagick: http://rmagick.rubyforge.org/
> RMagick 2: http://rmagick.rubyforge.org/rmagick2.html
>



add this to the top of your script:

$stdout.sync = true


That will stop it from buffering and will flush the output every time  
you call puts

Cheers-

- Ezra Zygmuntowicz
-- Founder & Software Architect
-- ezra / engineyard.com
-- EngineYard.com