uninitialized constant Chef::Artifact::DATA_BAG_NEXUS with chef's class_from_file
Closed this issue · 1 comments
CloCkWeRX commented
NameError
---------
uninitialized constant Chef::Artifact::DATA_BAG_NEXUS
Cookbook Trace:
---------------
/tmp/chef/cookbooks/artifact/libraries/chef_artifact_nexus_configuration.rb:12:in `from_data_bag'
/tmp/chef/cookbooks/artifact/resources/file.rb:32:in `class_from_file'
Relevant File Content:
----------------------
/tmp/chef/cookbooks/artifact/libraries/chef_artifact_nexus_configuration.rb:
5: def from_data_bag
6: environment = unless Chef::Config[:solo]
7: Chef::Node.load(Chef::Config[:node_name]).chef_environment
8: else
9: nil
10: end
11:
12>> config = Chef::Artifact.data_bag_config_for(environment, Chef::Artifact::DATA_BAG_NEXUS)
13: if config.nil? || config.empty?
14: Chef::Log.debug "No Data Bag found for NexusConfiguration."
15: nil
16: else
17: new(config['url'], config['repository'], config['username'], config['password'], config['ssl_verify'])
18: end
19: end
20: end
21:
Annoying load order issue or something - http://www.rubydoc.info/github/opscode/chef/master/Chef/Mixin/FromFile:class_from_file doesn't know to load the definition of chef::artifact.
Only started occuring when I upgraded to berkshelf 3.0 :/
CloCkWeRX commented
Nevermind, someone had forked the the cookbook and the load order went stupid.