Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 276209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:53:03+00:00 2026-05-12T00:53:03+00:00

I’m experiencing something that I can’t explain with Rails 2.3.2. I’ve created a new

  • 0

I’m experiencing something that I can’t explain with Rails 2.3.2. I’ve created a new app, with one controller and one action to try narrowing this down. My entire controller is as follows.

class LinesController < ApplicationController
  def show
    respond_to do |format|
      format.html { render :text => proc {|response, output|
          10.times do |i|
            output.write("This is line #{i}\n")
            output.flush
          end
        }
      }
    end
  end
end

When I run this under Rails 2.2.2 I see the following response.

$ curl http://localhost:3002/lines
This is line 0
This is line 1
This is line 2
This is line 3
This is line 4
This is line 5
This is line 6
This is line 7
This is line 8
This is line 9

However, when I run this under Rails 2.3.2, I get this instead.

$ curl http://localhost:3002/lines
curl: (18) transfer closed with outstanding read data remaining

If I hit this with a browser I see only the first line.

This is line 0

Note that my example code is directly out of the Rails documentation for render, except that I reduced the number of lines from 10 million to 10.

I suspect that the answer lies somewhere in the flush() method, but I’m currently stuck trying to dig an explanation out of the source code.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T00:53:04+00:00Added an answer on May 12, 2026 at 12:53 am

    I believe this bug was resolved on 2-3-stable by commit bc2c4a45959be21e6314fba7876b32c1f04cd08a. Check out the accompanying ticket. You can either wait for 2.3.3 (not that far off now), or freeze the current 2-3-stable from git:

    git clone git://github.com/rails/rails.git vendor/rails
    cd vendor/rails
    git checkout origin/2-3-stable
    rm -rf .git
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.