This repository has been archived by the owner on Mar 21, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Observed exception when client.rb includes Ohai::Config #7
Comments
I get the same when running Commenting out /Library/Ruby/Gems/2.0.0/gems/buff-config-1.0.1/lib/buff/config/ruby.rb:30:in `rescue in initialize': uninitialized constant Buff::Config::Ruby::Evaluator::Ohai (Buff::Errors::InvalidConfig)
from /Library/Ruby/Gems/2.0.0/gems/buff-config-1.0.1/lib/buff/config/ruby.rb:25:in `initialize'
from /Library/Ruby/Gems/2.0.0/gems/buff-config-1.0.1/lib/buff/config/ruby.rb:17:in `new'
from /Library/Ruby/Gems/2.0.0/gems/buff-config-1.0.1/lib/buff/config/ruby.rb:17:in `parse'
from /Library/Ruby/Gems/2.0.0/gems/buff-config-1.0.1/lib/buff/config/ruby.rb:119:in `from_ruby'
from /Library/Ruby/Gems/2.0.0/gems/buff-config-1.0.1/lib/buff/config/ruby.rb:112:in `initialize'
from /Library/Ruby/Gems/2.0.0/gems/ridley-4.1.2/lib/ridley/chef/config.rb:83:in `initialize'
from /Library/Ruby/Gems/2.0.0/gems/berkshelf-3.2.3/lib/berkshelf.rb:90:in `new'
from /Library/Ruby/Gems/2.0.0/gems/berkshelf-3.2.3/lib/berkshelf.rb:90:in `chef_config'
from /Library/Ruby/Gems/2.0.0/gems/berkshelf-3.2.3/lib/berkshelf/config.rb:80:in `<class:Config>'
from /Library/Ruby/Gems/2.0.0/gems/berkshelf-3.2.3/lib/berkshelf/config.rb:4:in `<module:Berkshelf>'
from /Library/Ruby/Gems/2.0.0/gems/berkshelf-3.2.3/lib/berkshelf/config.rb:3:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/berkshelf-3.2.3/lib/berkshelf/cookbook_generator.rb:3:in `require_relative'
from /Library/Ruby/Gems/2.0.0/gems/berkshelf-3.2.3/lib/berkshelf/cookbook_generator.rb:3:in `<class:CookbookGenerator>'
from /Library/Ruby/Gems/2.0.0/gems/berkshelf-3.2.3/lib/berkshelf/cookbook_generator.rb:2:in `<module:Berkshelf>'
from /Library/Ruby/Gems/2.0.0/gems/berkshelf-3.2.3/lib/berkshelf/cookbook_generator.rb:1:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/berkshelf-3.2.3/lib/berkshelf.rb:197:in `require_relative'
from /Library/Ruby/Gems/2.0.0/gems/berkshelf-3.2.3/lib/berkshelf.rb:197:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Library/Ruby/Gems/2.0.0/gems/berkshelf-3.2.3/lib/berkshelf/cli.rb:1:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Library/Ruby/Gems/2.0.0/gems/berkshelf-3.2.3/bin/berks:3:in `<top (required)>'
from /usr/bin/berks:23:in `load'
from /usr/bin/berks:23:in `<main>' |
same here, nasty error |
any fix/workaround? |
you might be able to wrap your own code with: if defined?(Ohai::Config)
...
end berks/ridley/buff-config does not have any idea what Ohai::Config is. this is a problem with using .rb files for config and then having multiple different contexts that parse the config file. if it was a json file this couldn't happen, but you'd lose the flexibility that you're losing. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I got an exception when using
I have these extra lines in my /etc/chef/client.rb
Here is the stacktrace
The text was updated successfully, but these errors were encountered: