Actions
Bug #11044
closedrake fix_cached_counters fails "undefined method `counter_cache_column' for nil:NilClass"
Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Rake tasks
Target version:
-
Description
My "Domains" page is showing counters that are about 100 to 1000 times off real counts, so i checked out how this may be cleared up/repaired and i'm trying to run "foreman-rake fix_cached_counters" and it fails.
foreman-rake fix_cached_counters --trace- Invoke fix_cached_counters (first_time)
- Invoke environment (first_time)
- Execute environment
- Execute fix_cached_counters
Correcting cached counters: (this may take a few minutes)
Architecture corrected
Environment corrected
Operatingsystem corrected
rake aborted!
undefined method `counter_cache_column' for nil:NilClass
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/counter_cache.rb:32:in `block in reset_counters'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/counter_cache.rb:19:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/counter_cache.rb:19:in `reset_counters'
/usr/share/foreman/lib/tasks/fix_cached_counters.rake:5:in `block (3 levels) in <top (required)>'
/usr/share/foreman/lib/tasks/fix_cached_counters.rake:5:in `each'
/usr/share/foreman/lib/tasks/fix_cached_counters.rake:5:in `block (2 levels) in <top (required)>'
/usr/share/foreman/lib/tasks/fix_cached_counters.rake:4:in `each'
/usr/share/foreman/lib/tasks/fix_cached_counters.rake:4:in `block in <top (required)>'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `call'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `block in execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `each'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:in `block in invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in `invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in `invoke'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:116:in `invoke_task'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block (2 levels) in top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `each'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block in top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:88:in `top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:66:in `block in run'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:in `run'
/opt/rh/ruby193/root/usr/bin/rake:32:in `<main>'
Tasks: TOP => fix_cached_counters
Actions