Project

General

Profile

Actions

Bug #3988

closed

Expected app/services/foreman/plugin.rb to define Plugin

Added by Dominic Cleal almost 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Category:
Rails
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Since #3821, the "rake locale:find" command throws an error, identical to the one we saw during the PR with rake test:

rake aborted!
Expected /home/dcleal/code/foreman/foreman/app/services/foreman/plugin.rb to define Plugin
/home/dcleal/.rvm/gems/ruby-2.0.0-p247@foreman/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:503:in `load_missing_constant'
/home/dcleal/code/foreman/foreman_hooks/lib/foreman_hooks.rb:82:in `load_missing_constant_with_hooks'
/home/dcleal/.rvm/gems/ruby-2.0.0-p247@foreman/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:192:in `block in const_missing'
/home/dcleal/.rvm/gems/ruby-2.0.0-p247@foreman/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:190:in `each'
/home/dcleal/.rvm/gems/ruby-2.0.0-p247@foreman/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:190:in `const_missing'
/home/dcleal/.rvm/gems/ruby-2.0.0-p247@foreman/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:514:in `load_missing_constant'

I suspect using autoload_once not on the top level dir (app/services) means it thinks the foreman subdir is just part of the path and not part of the class namespace. Maybe it's only happening with this rake task because it loads so many of the models and classes known in the application, while other simpler rake tasks don't, and rake test isn't affected by the previous commit because it's in the test environment.


Related issues 2 (0 open2 closed)

Related to Foreman - Bug #3821: Plugin menus are lost after page refresh in development modeClosedAmos Benari12/05/2013Actions
Related to Foreman - Bug #4140: GET on /API generate 500 errorResolved01/20/2014Actions
Actions

Also available in: Atom PDF