IO.popen("ant") do |output| while line = output.gets do # ... maybe puts line? something more interesting? end end