Mike B. wrote:
We are running a Rails application in development mode. Intermittenly we
get an error on some pages, saying : undefine class/module User. If we
refresh the page, the error goes away and we see the html correctly
rendered. User is a model defined in the models directory and has been
listed in application.rb as model :user.
I am suprised by the fact that this happens only occasionally. Can
someone suggest what might have gone wrong?
I have seen this problem too. It seems to happen when the system is
under heavy load. I suspect that the reflection technique used to
get the table details is hitting some timeout when trying to access
The environment where it occasionally occurs for me is
– Development mode, Rails 1.0, Ruby 1.8.4
– Webrick using SSL
– Heavy load
If a timeout occurs on db access, shouldn’t Rails just retry later?
(that would be the robust thing)
How can development mode cause this kind of error? (makes things slower,
yes … but they shouldn’t break).
– Mike B.
I am under ruby 1.8.5,rails 1.1.6,Development mode,system is not under
class QueryController < ApplicationController
@@score_cache ||= File.zero?(‘score.cache’) ? Hash.new :
It’s all right when this Controller be called the first time,then it
will nerver run,just raise this exception:undefined class/module Cring
After restart my Webrick,it will be right just once,then raise