0x1c: Bummer! Rails dynamic streaming doesn’t work

Rails dynamic streaming doesn’t work. At least sometimes. While the Rails documentation, and all the euphoric comments in the community feature code examples along the lines of

  # Renders "Hello from code!"
  render :text => proc { |response, output| 
    output.write("Hello from code!") }

But this just doesn’t work as not-really-advertised. The reason? While rails correctly – that is to say in the way it is documented – does write directly to the output stream, at least with Mongrel the output stream is just a String.

So whatever you are doing: the entire request is still collected in RAM. Bummer!<


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s