Mike Berrow wrote:
> Yash wrote:
>> Hi,
>>
>> 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?
>>
>> Thanks,
>> Yash
>
> 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 database.
> The environment where it occasionally occurs for me is
> -- Development mode, Rails 1.0, Ruby 1.8.4
> -- Linux
> -- Postgres
> -- Webrick using SSL
> -- Heavy load
>
> My questions:
> 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 Berrow
I am under ruby 1.8.5,rails 1.1.6,Development mode,system is
not under
heavy load:
require 'Cring'
class QueryController < ApplicationController
......
 score_cache ||= File.zero?('score.cache') ? Hash.new
:
Marshal.load( f)
......
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
exception!
--
Posted via http://www.ruby-forum.com
/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe googlegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
|