Undefined method `importHostsAndFacts' for class `Class' when upgrading Foreman 1.4.4 to 1.5

Hi,

I'm running Foreman on Ubuntu 12.04. I followed the upgrade instructions
at Foreman :: Manual and get an error
when running db:migrate.

ubuntu@puppetmaster:/etc/foreman$ sudo foreman-rake db:migrate --trace

** Invoke db:migrate (first_time)

** Invoke environment (first_time)

** Execute environment

[deprecated] I18n.enforce_available_locales will default to true in the
future. If you really want to skip validation of your locale you can set
I18n.enforce_available_locales = false to avoid this message.

rake aborted!

undefined method importHostAndFacts' for classClass'

/usr/share/foreman/vendor/ruby/1.8/gems/activesupport-3.2.18/lib/active_support/core_ext/module/aliasing.rb:31:in
`alias_method'

/usr/share/foreman/vendor/ruby/1.8/gems/activesupport-3.2.18/lib/active_support/core_ext/module/aliasing.rb:31:in
`alias_method_chain'

/usr/share/foreman/vendor/ruby/1.8/bundler/gems/foreman_default_hostgroup-d07d3b0700ee/lib/default_hostgroup_managed_host_patch.rb:7:in
`included'

/usr/share/foreman/vendor/ruby/1.8/bundler/gems/foreman_default_hostgroup-d07d3b0700ee/lib/default_hostgroup_managed_host_patch.rb:5:in
`class_eval'

/usr/share/foreman/vendor/ruby/1.8/bundler/gems/foreman_default_hostgroup-d07d3b0700ee/lib/default_hostgroup_managed_host_patch.rb:5:in
`included'

/usr/share/foreman/vendor/ruby/1.8/bundler/gems/foreman_default_hostgroup-d07d3b0700ee/lib/foreman_default_hostgroup/engine.rb:20:in
`include'

/usr/share/foreman/vendor/ruby/1.8/bundler/gems/foreman_default_hostgroup-d07d3b0700ee/lib/foreman_default_hostgroup/engine.rb:20:in
`send'

/usr/share/foreman/vendor/ruby/1.8/bundler/gems/foreman_default_hostgroup-d07d3b0700ee/lib/foreman_default_hostgroup/engine.rb:20:in
`_callback_before_481'

/usr/share/foreman/vendor/ruby/1.8/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:440:in
`_run__14711140__prepare__4__callbacks'

/usr/share/foreman/vendor/ruby/1.8/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:405:in
`send'

/usr/share/foreman/vendor/ruby/1.8/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:405:in
`__run_callback'

/usr/share/foreman/vendor/ruby/1.8/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:385:in
`_run_prepare_callbacks'

/usr/share/foreman/vendor/ruby/1.8/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:81:in
`send'

/usr/share/foreman/vendor/ruby/1.8/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:81:in
`run_callbacks'

/usr/share/foreman/vendor/ruby/1.8/gems/actionpack-3.2.18/lib/action_dispatch/middleware/reloader.rb:74:in
`prepare!'

/usr/share/foreman/vendor/ruby/1.8/gems/actionpack-3.2.18/lib/action_dispatch/middleware/reloader.rb:48:in
`prepare!'

/usr/share/foreman/vendor/ruby/1.8/gems/railties-3.2.18/lib/rails/application/finisher.rb:47

/usr/share/foreman/vendor/ruby/1.8/gems/railties-3.2.18/lib/rails/initializable.rb:30:in
`instance_exec'

/usr/share/foreman/vendor/ruby/1.8/gems/railties-3.2.18/lib/rails/initializable.rb:30:in
`run'

/usr/share/foreman/vendor/ruby/1.8/gems/railties-3.2.18/lib/rails/initializable.rb:55:in
`run_initializers'

/usr/share/foreman/vendor/ruby/1.8/gems/railties-3.2.18/lib/rails/initializable.rb:54:in
`each'

/usr/share/foreman/vendor/ruby/1.8/gems/railties-3.2.18/lib/rails/initializable.rb:54:in
`run_initializers'

/usr/share/foreman/vendor/ruby/1.8/gems/railties-3.2.18/lib/rails/application.rb:136:in
`initialize!'

/usr/share/foreman/vendor/ruby/1.8/gems/railties-3.2.18/lib/rails/railtie/configurable.rb:30:in
`send'

/usr/share/foreman/vendor/ruby/1.8/gems/railties-3.2.18/lib/rails/railtie/configurable.rb:30:in
`method_missing'

/usr/share/foreman/config/environment.rb:5

/usr/share/foreman/vendor/ruby/1.8/gems/polyglot-0.3.4/lib/polyglot.rb:65:in
`polyglot_original_require'

/usr/share/foreman/vendor/ruby/1.8/gems/polyglot-0.3.4/lib/polyglot.rb:65:in
`require'

/usr/share/foreman/vendor/ruby/1.8/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:in
`require'

/usr/share/foreman/vendor/ruby/1.8/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:236:in
`load_dependency'

/usr/share/foreman/vendor/ruby/1.8/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:in
`require'

/usr/share/foreman/vendor/ruby/1.8/gems/railties-3.2.18/lib/rails/application.rb:103:in
`require_environment!'

/usr/share/foreman/vendor/ruby/1.8/gems/railties-3.2.18/lib/rails/application.rb:305:in
`initialize_tasks'

/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.1.1/lib/rake/task.rb:236:in
`call'

/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.1.1/lib/rake/task.rb:236:in
`execute'

/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.1.1/lib/rake/task.rb:231:in
`each'

/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.1.1/lib/rake/task.rb:231:in
`execute'

/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.1.1/lib/rake/task.rb:175:in
`invoke_with_call_chain'

/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'

/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.1.1/lib/rake/task.rb:168:in
`invoke_with_call_chain'

/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.1.1/lib/rake/task.rb:197:in
`invoke_prerequisites'

/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.1.1/lib/rake/task.rb:195:in
`each'

/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.1.1/lib/rake/task.rb:195:in
`invoke_prerequisites'

/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.1.1/lib/rake/task.rb:174:in
`invoke_with_call_chain'

/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'

/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.1.1/lib/rake/task.rb:168:in
`invoke_with_call_chain'

/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.1.1/lib/rake/task.rb:161:in
`invoke'

/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.1.1/lib/rake/application.rb:149:in
`invoke_task'

/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.1.1/lib/rake/application.rb:106:in
`top_level'

/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.1.1/lib/rake/application.rb:106:in
`each'

/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.1.1/lib/rake/application.rb:106:in
`top_level'

/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.1.1/lib/rake/application.rb:115:in
`run_with_threads'

/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.1.1/lib/rake/application.rb:100:in
`top_level'

/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.1.1/lib/rake/application.rb:78:in
`run'

/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.1.1/lib/rake/application.rb:165:in
`standard_exception_handling'

/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.1.1/lib/rake/application.rb:75:in
`run'

/usr/bin/rake:27

Tasks: TOP => db:migrate => environment

I'm not sure how to proceed, other than rolling back for now. Any
suggestions?

-Doug

Thats coming from an old version of the Defaul Hostgroup plugin
(/usr/share/foreman/vendor/ruby/1.8/bundler/gems/foreman_default_hostgroup-d07d3b0700ee/lib/default_hostgroup_managed_host_patch.rb:7
in your error output). I'd suggest disabling the plugin while
completing the update, and then upgrade the plugin.

Greg

Greg, Thank you very much. I disabled the plugin and the upgrade was
successful.

-Doug

ยทยทยท On Monday, May 19, 2014 11:11:28 AM UTC-4, Greg Sutcliffe wrote: > > Thats coming from an old version of the Defaul Hostgroup plugin > (/usr/share/foreman/vendor/ruby/1.8/bundler/gems/foreman_default_hostgroup-d07d3b0700ee/lib/default_hostgroup_managed_host_patch.rb:7 > > in your error output). I'd suggest disabling the plugin while > completing the update, and then upgrade the plugin. > > Greg >