Strange error in development mode in 2.3.2 when streaming data

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:


class Visitor < ActiveRecord::Base
has_many :events


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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs