2010-10-15 37 views

回答

2

我結束了在這個片段中的解決方案

STDOUT.sync = true 
IO.popen(command+" 2>&1") do |pipe| 
    pipe.sync = true 
    while str = pipe.gets 
    puts "-> "+str 
    end 
end