For the benefit of anyone else who might encounter this problem, I
managed to track the problem down to the acts_as_audited plugin. The
information in an old thread at
http://groups.google.com/group/activescaffold/browse_thread/thread/a717fa3c8b7433a6
provided the fix.

On Jun 28, 10:33 pm, David Cato <[email protected]> wrote:
> I've run into a caching-related problem (works fine in development mode
> but fails in production mode) that I'm having a hard time tracking down
> and I'm wondering if anyone else has run across a similar problem or has
> any ideas of how to track the problem down. FWIW, I'm using the latest
> rails-2.2 branch (65e47775) of AS.
>
> The problem is that when clicking on a nested association link on the
> index page of the parent, the server throws an exception as shown below.
> Unfortunately, I cannot reproduce the error in a (relatively) simple
> test case, nor does the error occur in other applications that use AS in
> the same manner (even using the same pair of models), so I'm suspecting
> that there's some interference from one, or more, plugins or gems that
> are being used in this application that are not being used in the other
> applications.
>
> Since building up a test case hasn't been fruitful I'm about to start
> tearing the application apart, discarding parts bit by bit until I get
> to something that works. But if anyone has some helpful pointers to
> offer before I get too deep into deconstruction I'd appreciate hearing
> them.
>
> Here's the stack trace and the requests that preceeded it:
>
> Processing Admin::CountriesController#nested (for 127.0.0.1 at 2009-06-28 
> 21:35:12) [GET]
>   Parameters: {"associations"=>"regions", "action"=>"nested", 
> "_method"=>"get", "adapter"=>"_list_inline_adapter", "id"=>"14", 
> "controller"=>"admin/countries"}
>
> DEPRECATION WARNING: render_component_as_string is deprecated ...
> Start rendering component ({:action=>"table", :controller=>"admin/regions", 
> :params=>{:parent_column=>"regions", :parent_model=>Country(id: integer, 
> name: string, country_code: string, region_name: string), 
> :eid=>"3720c8bb6cc32d5b62f6d1e178c281b2", :nested=>true}}):
>
> Processing Admin::RegionsController#table (for 127.0.0.1 at 2009-06-28 
> 21:35:12) [GET]
>   Parameters: {"parent_column"=>"regions", 
> "eid"=>"3720c8bb6cc32d5b62f6d1e178c281b2", "nested"=>true, "action"=>"table", 
> "id"=>nil, "controller"=>"admin/regions", "parent_model"=>Country(id: 
> integer, name: string, country_code: string, region_name: string)}
>
> Rendering admin/regions/list
>
> Completed in 212ms (View: 198, DB: 4) | 200 OK
> [http://localhost/admin/countries/14/nested?_method=get&associations=r...]
>
> End of component rendering
>
> NoMethodError (undefined method `controller_name' for nil:NilClass):
>     
> /usr/lib64/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sweeping.rb:83:in
>  `callback'
>     
> /usr/lib64/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sweeping.rb:65:in
>  `after'
>     
> /usr/lib64/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:208:in
>  `around_proc'
>     
> /usr/lib64/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:182:in
>  `call'
>     
> /usr/lib64/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:182:in
>  `evaluate_method'
>     
> /usr/lib64/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:184:in
>  `call'
>     
> /usr/lib64/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:635:in
>  `run_before_filters'
>     
> /usr/lib64/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:615:in
>  `call_filters'
>     
> /usr/lib64/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:610:in
>  `perform_action_without_benchmark'
>     
> /usr/lib64/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in
>  `perform_action_without_rescue'
>     /usr/lib64/ruby/1.8/benchmark.rb:293:in `measure'
>     
> /usr/lib64/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in
>  `perform_action_without_rescue'
>     
> /usr/lib64/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:136:in
>  `perform_action_without_caching'
>     
> /usr/lib64/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:in
>  `perform_action'
>     
> /usr/lib64/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in
>  `cache'
>     
> /usr/lib64/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in
>  `cache'
>     
> /usr/lib64/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in
>  `perform_action'
>     
> /usr/lib64/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in
>  `send'
>     
> /usr/lib64/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in
>  `process_without_filters'
>     
> /usr/lib64/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in
>  `process_without_session_management_support'
>     
> /usr/lib64/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in
>  `process'
>     
> /usr/lib64/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in
>  `process'
>     
> /usr/lib64/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in
>  `handle_request'
>     ...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to