Project

General

Profile

Actions

Bug #3988

closed

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

Added by Dominic Cleal about 10 years ago. Updated over 5 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 #1

Updated by Dominic Cleal about 10 years ago

  • Related to Bug #3821: Plugin menus are lost after page refresh in development mode added
Actions #2

Updated by Dominic Cleal about 10 years ago

  • Priority changed from High to Urgent

Also breaks /apidoc...

Actions #3

Updated by Dominic Cleal about 10 years ago

and /api/plugins

Actions #4

Updated by Dominic Cleal about 10 years ago

  • Related to Bug #4140: GET on /API generate 500 error added
Actions #5

Updated by Dominic Cleal about 10 years ago

  • translation missing: en.field_release deleted (2)
Actions #6

Updated by Dominic Cleal about 10 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Ivan Necas
  • Target version set to 1.9.0
  • translation missing: en.field_release set to 4
Actions #7

Updated by Ivan Necas about 10 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF