*Rails Output Streaming*
I am revisiting this again because I am in a situation where I need output streaming. Rails has two methods that utilize streaming (send_data, send_file) I've modified this to meet my needs, along with the help of people on the mailinglist. However the code below which should work, does not provide output streaming. I know in the past output streaming has worked within rails, I am wondering if in a current release it has been broken. Whatever the case is, I need to determine why I cannot get the output streaming mechanism in rails to work.
I'm using lighttpd on fc5. I've used mongrel with the same results.
class TestController < ApplicationController
def index
render :text => Proc.new { |resp, out|
out.puts 'start'
out.flush
10.times do
out.puts '.'
out.flush
sleep 1
end
out.puts 'done'
}
end
end
People succeed in answering Don Miguel de los Platanos's questions 42% of the time (8 successes in 19 attempts).
Answers by: Rich Collins | Zachary Holt
Hint from Rich:
Use markdown to format your questions:
code is formatted using 4 space indention:
this is some code
this is the next line