Project

General

Profile

Actions

Bug #7596

closed

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

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
Plugins
Target version:
Difficulty:
Triaged:
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>'
Actions

Also available in: Atom PDF