Custom Plugin Configuration Definition error : undefined method `new' for RbConfig:Module

28 views
Skip to first unread message

Gibu George

unread,
Mar 10, 2016, 3:53:32 AM3/10/16
to Vagrant
Hi All,

While trying to create to a configuration component for my custom plugin, I am getting this error : 


/Users/gigeor/work/foo/lib/foo.rb:16:in `block in <class:MyPlugin>': Use RbConfig instead of obsolete and deprecated Config.
/Users/gigeor/.bundler/ruby/2.1.0/vagrant-1f88a9737369/lib/vagrant/config/v2/root.rb:30:in `method_missing': Use RbConfig instead of obsolete and deprecated Config.
/opt/chefdk/embedded/lib/ruby/2.1.0/rbconfig/obsolete.rb:20:in `method_missing': undefined method `new' for RbConfig:Module (NoMethodError)
from /Users/gigeor/.bundler/ruby/2.1.0/vagrant-1f88a9737369/lib/vagrant/config/v2/root.rb:30:in `method_missing'
from /Users/gigeor/work/foo/Vagrantfile:2:in `block in <top (required)>'
from /Users/gigeor/.bundler/ruby/2.1.0/vagrant-1f88a9737369/lib/vagrant/config/v2/loader.rb:37:in `call'
from /Users/gigeor/.bundler/ruby/2.1.0/vagrant-1f88a9737369/lib/vagrant/config/v2/loader.rb:37:in `load'
from /Users/gigeor/.bundler/ruby/2.1.0/vagrant-1f88a9737369/lib/vagrant/config/loader.rb:113:in `block (2 levels) in load'
from /Users/gigeor/.bundler/ruby/2.1.0/vagrant-1f88a9737369/lib/vagrant/config/loader.rb:107:in `each'
from /Users/gigeor/.bundler/ruby/2.1.0/vagrant-1f88a9737369/lib/vagrant/config/loader.rb:107:in `block in load'
from /Users/gigeor/.bundler/ruby/2.1.0/vagrant-1f88a9737369/lib/vagrant/config/loader.rb:104:in `each'
from /Users/gigeor/.bundler/ruby/2.1.0/vagrant-1f88a9737369/lib/vagrant/config/loader.rb:104:in `load'
from /Users/gigeor/.bundler/ruby/2.1.0/vagrant-1f88a9737369/lib/vagrant/vagrantfile.rb:28:in `initialize'
from /Users/gigeor/.bundler/ruby/2.1.0/vagrant-1f88a9737369/lib/vagrant/environment.rb:740:in `new'
from /Users/gigeor/.bundler/ruby/2.1.0/vagrant-1f88a9737369/lib/vagrant/environment.rb:740:in `vagrantfile'
from /Users/gigeor/.bundler/ruby/2.1.0/vagrant-1f88a9737369/lib/vagrant/environment.rb:486:in `host'
from /Users/gigeor/.bundler/ruby/2.1.0/vagrant-1f88a9737369/lib/vagrant/environment.rb:208:in `block in action_runner'
from /Users/gigeor/.bundler/ruby/2.1.0/vagrant-1f88a9737369/lib/vagrant/action/runner.rb:33:in `call'
from /Users/gigeor/.bundler/ruby/2.1.0/vagrant-1f88a9737369/lib/vagrant/action/runner.rb:33:in `run'
from /Users/gigeor/.bundler/ruby/2.1.0/vagrant-1f88a9737369/lib/vagrant/environment.rb:473:in `hook'
from /Users/gigeor/.bundler/ruby/2.1.0/vagrant-1f88a9737369/lib/vagrant/environment.rb:722:in `unload'
from /Users/gigeor/.bundler/ruby/2.1.0/vagrant-1f88a9737369/bin/vagrant:177:in `<top (required)>'
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/bin/vagrant:23:in `load'
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/bin/vagrant:23:in `<main>'

In the definition of the configuration component i tried using RbConfig instead of Config, but still getting the same stack trace. 

Any one faced this problem while trying to create a configuration component? How to resolve this?

--gibu

Gibu George

unread,
Mar 10, 2016, 7:11:17 AM3/10/16
to Vagrant
Solved it, was refereeing to the wrong class as declared.

-gibu
Reply all
Reply to author
Forward
0 new messages