Streaming programmatically generated content from Rails

Rather than use the send_file or send_data methods to send an entire, completed bulk of information back to the client, David N. Welton wanted to, effectively, print stuff to the client bit by bit. He worked out how to do it and presents his findings and sample code here.