Project

General

Profile

Actions

Bug #2300

closed

Rake task "reports:summarize" aborted: undefined method `all' for "Host::Managed":String

Added by Andreas Ntaflos over 11 years ago. Updated over 11 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

This happens on Ubuntu 12.04.2 using Ruby 1.8.7 after updating to 91de7d43032caad4d3791fee5bc17981e48a015e.

sudo -u foreman -H RAILS_ENV=production rake reports:summarize --trace                                                                                                
** Invoke reports:summarize (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute reports:summarize
rake aborted!
undefined method `all' for "Host::Managed":String
/usr/local/share/foreman/app/models/host_mailer.rb:43:in `summary'
/usr/local/share/foreman/vendor/ruby/1.8/gems/actionpack-3.0.20/lib/abstract_controller/base.rb:150:in `send_action'
/usr/local/share/foreman/vendor/ruby/1.8/gems/actionpack-3.0.20/lib/abstract_controller/base.rb:150:in `process_action'
/usr/local/share/foreman/vendor/ruby/1.8/gems/actionpack-3.0.20/lib/abstract_controller/base.rb:119:in `process'
/usr/local/share/foreman/vendor/ruby/1.8/gems/actionpack-3.0.20/lib/abstract_controller/rendering.rb:41:in `process'
/usr/local/share/foreman/vendor/ruby/1.8/gems/actionmailer-3.0.20/lib/action_mailer/old_api.rb:75:in `process'
/usr/local/share/foreman/vendor/ruby/1.8/gems/actionmailer-3.0.20/lib/action_mailer/base.rb:471:in `process'
/usr/local/share/foreman/vendor/ruby/1.8/gems/actionmailer-3.0.20/lib/action_mailer/base.rb:466:in `initialize'
/usr/local/share/foreman/vendor/ruby/1.8/gems/actionmailer-3.0.20/lib/action_mailer/deprecated_api.rb:70:in `new'
/usr/local/share/foreman/vendor/ruby/1.8/gems/actionmailer-3.0.20/lib/action_mailer/deprecated_api.rb:70:in `method_missing'
/usr/local/share/foreman/vendor/ruby/1.8/gems/actionmailer-3.0.20/lib/action_mailer/base.rb:452:in `method_missing'
/usr/local/share/foreman/lib/tasks/reports.rake:78
/usr/lib/ruby/vendor_ruby/rake/task.rb:205:in `call'
/usr/lib/ruby/vendor_ruby/rake/task.rb:205:in `execute'
/usr/lib/ruby/vendor_ruby/rake/task.rb:200:in `each'
/usr/lib/ruby/vendor_ruby/rake/task.rb:200:in `execute'
/usr/lib/ruby/vendor_ruby/rake/task.rb:158:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/vendor_ruby/rake/task.rb:151:in `invoke_with_call_chain'
/usr/lib/ruby/vendor_ruby/rake/task.rb:144:in `invoke'
/usr/lib/ruby/vendor_ruby/rake/application.rb:116:in `invoke_task'
/usr/lib/ruby/vendor_ruby/rake/application.rb:94:in `top_level'
/usr/lib/ruby/vendor_ruby/rake/application.rb:94:in `each'
/usr/lib/ruby/vendor_ruby/rake/application.rb:94:in `top_level'
/usr/lib/ruby/vendor_ruby/rake/application.rb:133:in `standard_exception_handling'
/usr/lib/ruby/vendor_ruby/rake/application.rb:88:in `top_level'
/usr/lib/ruby/vendor_ruby/rake/application.rb:66:in `run'
/usr/lib/ruby/vendor_ruby/rake/application.rb:133:in `standard_exception_handling'
/usr/lib/ruby/vendor_ruby/rake/application.rb:63:in `run'
/usr/bin/rake:27
Tasks: TOP => reports:summarize

Greg Sutcliffe provided a working patch for this issue, see attachment.


Files

host_mailer.rb.patch host_mailer.rb.patch 639 Bytes Patch for host_mailer.rb to make reports:summarize work again Andreas Ntaflos, 03/11/2013 11:25 AM

Related issues 1 (0 open1 closed)

Has duplicate Foreman - Bug #2323: syntax bug in Host MailerClosedJoseph Magen03/14/2013Actions
Actions

Also available in: Atom PDF