Forum: Ruby on Rails Strange error in development mode in 2.3.2 when streaming data

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Jeff C. (Guest)
on 2009-03-26 16:23
(Received via mailing list)
I've recently upgraded to 2.3.2 from 2.2.2.  We used to have code in
our controller that streamed data back to the browser in chunks, and
that no longer works in 2.3.2.  It seems to be messing up the
dependency-loading mechanism. Here's a simplified version of the code:

# visitor.rb
class Visitor < ActiveRecord::Base
  has_many :events

# event.rb
class Event < ActiveRecord::Base
  belongs_to :visitor

# Now the interesting part...

class MyController < ActionController::Base

  def index
     render  :status => 200, :layout => false,
                 :text => { |response, output| output.write    }

The error we get is:

A copy of Admin::VisitorEventsController has been removed from the
module tree but is still active!

This only happens if we try to reference an ActiveRecord model within
the proc.  We can't move our code out of the proc, because the whole
idea is that we'll be streaming data that's being dynamically
generated inside the proc.

Anybody else seen this?

This topic is locked and can not be replied to.