Project

General

Profile

Bug #7596

Plugin dependencies throw undefined method `to_sym' for nil:NilClass error

Added by Dominic Cleal about 6 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Plugins
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Adding a simple dependency to a plugin definition throws an ugly error when the plugin's loaded. There are quite a few more issues with the dependency verification beyond this one.

requires :dns, '~> 1.6.0'
/home/dcleal/code/foreman/smart-proxy/lib/proxy/plugin.rb:8:in `initialize': undefined method `to_sym' for nil:NilClass (NoMethodError)
    from /home/dcleal/code/foreman/smart-proxy/lib/proxy/plugin.rb:79:in `new'
    from /home/dcleal/code/foreman/smart-proxy/lib/proxy/plugin.rb:79:in `requires'
    from /home/dcleal/code/foreman/smart-proxy_hello/lib/smart_proxy_hello/hello_plugin.rb:12:in `<class:Plugin>'
    from /home/dcleal/code/foreman/smart-proxy_hello/lib/smart_proxy_hello/hello_plugin.rb:4:in `<module:Hello>'
    from /home/dcleal/code/foreman/smart-proxy_hello/lib/smart_proxy_hello/hello_plugin.rb:3:in `<top (required)>'
    from /home/dcleal/code/foreman/smart-proxy_hello/lib/smart_proxy_hello.rb:1:in `require'
    from /home/dcleal/code/foreman/smart-proxy_hello/lib/smart_proxy_hello.rb:1:in `<top (required)>'
    from /home/dcleal/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `require'
    from /home/dcleal/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
    from /home/dcleal/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `each'
    from /home/dcleal/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `block in require'
    from /home/dcleal/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `each'
    from /home/dcleal/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `require'
    from /home/dcleal/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.6.2/lib/bundler.rb:132:in `require'
    from /home/dcleal/code/foreman/smart-proxy/lib/bundler_helper.rb:25:in `require_groups'
    from /home/dcleal/code/foreman/smart-proxy/lib/smart_proxy.rb:23:in `<top (required)>'
    from bin/smart-proxy:5:in `require'
    from bin/smart-proxy:5:in `<main>'

Associated revisions

Revision 20b9f969 (diff)
Added by Dominic Cleal about 6 years ago

fixes #7596 - validate plugin dependencies when loading, various fixes

History

#1 Updated by Dominic Cleal about 6 years ago

  • Status changed from New to Assigned
  • Assignee set to Dominic Cleal
  • Target version set to 1.7.3

#2 Updated by The Foreman Bot about 6 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/smart-proxy/pull/213 added
  • Pull request deleted ()

#3 Updated by Dominic Cleal about 6 years ago

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

#4 Updated by Dominic Cleal about 6 years ago

  • Legacy Backlogs Release (now unused) set to 22

Also available in: Atom PDF