On 7 Dec 2007, at 05:37, Evan wrote:
Hmmm…I activated dependencies logging, but am not sure what to make
of the logged activity.
Parked at Loopia
Well you can sort of see what is happening, if you compare the good
load with the bad load:
Good:
Processing EditingController#index (for 127.0.0.1 at 2007-12-06
21:11:01)
[GET] Session ID: bd965b771927a6b290bbdc5018fe0364
Parameters: {“action”=>“index”, “controller”=>“editing”}
DEPRECATION WARNING: @session is deprecated! Call session.[] instead
of @session.[]. Args: [“editor”] See
for details. (called from editor? at /Users/evan/Rails/asktheguys/
asktheguys/public/…/config/…/lib/editor_system.rb:87)
DEPRECATION WARNING: @session is deprecated! Call session.[] instead
of @session.[]. Args: [“editor”] See
for details. (called from login_required at /Users/evan/Rails/
asktheguys/asktheguys/public/…/config/…/lib/editor_system.rb:47)
Dependencies: called load_missing_constant(Object, :Question)
Dependencies: called require_or_load(“/Users/evan/Rails/asktheguys/
asktheguys/public/…/config/…/app/models/question.rb”, nil)
Dependencies: loading /Users/evan/Rails/asktheguys/asktheguys/
public/…/config/…/app/models/question Dependencies: called
load_file(“/Users/evan/Rails/asktheguys/asktheguys/public/…/config/…/
app/models/question.rb”, [“Models::Question”, “Question”])
Dependencies: called new_constants_in(“Models”, :Object)
Dependencies: New constants: Question Dependencies: loading /Users/
evan/Rails/asktheguys/asktheguys/public/…/config/…/app/models/
question.rb defined Question
Question [4;36;1mQuestion Columns (0.000593) [0m [0;1mSHOW FIELDS
FROM questions [0m [4;35;1mSQL (0.000748) [0m [0mSELECT count(*) AS
count_all FROM questions [0m [4;36;1mQuestion Load (0.000936) [0m
[0;1mSELECT * FROM questions ORDER BY questions.created_on DESC LIMIT
0, 10 [0m
Bad:
Processing EditingController#index (for 127.0.0.1 at 2007-12-06
21:11:09)
[GET] Session ID: bd965b771927a6b290bbdc5018fe0364 Parameters:
{“action”=>“index”, “controller”=>“editing”}
DEPRECATION WARNING: @session is deprecated! Call session.[] instead
of @session.[]. Args: [“editor”] See
for details. (called from editor? at /Users/evan/Rails/asktheguys/
asktheguys/public/…/config/…/lib/editor_system.rb:87)
DEPRECATION WARNING: @session is deprecated! Call session.[] instead
of @session.[]. Args: [“editor”] See
for details. (called from login_required at /Users/evan/Rails/
asktheguys/asktheguys/public/…/config/…/lib/editor_system.rb:47)
[4;36;1mQuestion Columns (0.001567) [0m [0;1mSHOW FIELDS FROM
questions [0m [4;35;1mSQL (0.000583) [0m [0mSELECT count(*) AS
count_all FROM questions [0m [4;36;1mQuestion Load (0.000810) [0m
[0;1mSELECT * FROM questions ORDER BY questions.created_on DESC LIMIT
0, 10 [0m
See how in the first case Question is loaded from question.rb, but not
in the second case → something is hanging on to a stale reference to
the question class, and it’s something that happens in
editor_system.rb (like i said in my other mail, if you’re putting an
editor object in the session, that’s bad)
Fred