I’m getting an error I just can’t find any cause for.
The error is “A copy of ApplicationHelper has been removed from the
module tree but is still active!” and gets thrown
in a Template that uses a method defined in my ApplicationHelper. The
error occurs only in development mode.
The error did not occur before my switch to Ruby 1.8.7 and Rails 2.1.2
minutes ago.
I have absolutely no clue about what could be causing this.
The problem occurs on windows as well as MacOS X 10.5
Any help would be appreciated.
regards
Jan
Stacktrace:
ActionView::TemplateError (A copy of ApplicationHelper has been
removed from the module tree but is still active!) on line #57 of
photosessions/show.html.erb:
54:
55:
Other Methods in the helper never throw an exception…
After posting my original message I poked around the code a little bit
further.
I think accessing the “Price” model might cause the error.
But, uh, that’s not something that should happen, right?
out of the helper method and now everything seems to work.
I still think this error shouldn’t have happened in the first place.
I tried to investigate, but the dependency loader is so
full of Voodoo that I can’t figure it out.
out of the helper method and now everything seems to work.
I still think this error shouldn’t have happened in the first place.
I tried to investigate, but the dependency loader is so
full of Voodoo that I can’t figure it out.
Yes, it shouldn’t have happened. To pinpoint the blame,
can you try downgrading one of Rails or Ruby? It’d be
easiest to set RAILS_GEM_VERSION = ‘2.1.0’ in environment.rb.
I’ll try to investigate this a bit further.
The case you linked to describes a different problem though, it seems.
In my case the model (Price) and the ApplicationHelper are fairly
vanilla,
not loading any fancy external libraries through ways untrackable by
Rails dependency mechanisms.
That’s what’s bothering me so much (after all, I got my code running
by pulling the Price reference out of the helper),
all this seems to indicate a bug somewhere in the dependency/
autoreload mechanism.
I’ll try to investigate this a bit further.
The case you linked to describes a different problem though, it seems.
In my case the model (Price) and the ApplicationHelper are fairly
vanilla,
not loading any fancy external libraries through ways untrackable by
Rails dependency mechanisms.
You can also confuse the dependency system by using require when you
could/should be using require_dependency.
That’s what’s bothering me so much (after all, I got my code running
by pulling the Price reference out of the helper),
all this seems to indicate a bug somewhere in the dependency/
autoreload mechanism.
Ah, sorry, that was a little quick.
Actually the bug is caused by the resource_controller plugin.
My bad.
I posted a report in the resource_controller group.
regards
Jan
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.