Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninitialized Constant:: Knife Cookbook Metadata From File #8269

timio73 opened this Issue Mar 4, 2019 · 1 comment


None yet
1 participant
Copy link

timio73 commented Mar 4, 2019


Attempting to use knife cookbook metadata from file /path/to/metadata.rb, I receive the below error instead of the expected metadata.json.

Chef::Knife::CookbookMetadata (NameError)
Did you mean?  Chef::Knife::CookbookMetadataFromFile

Chef Version

Chef Workstation 0.2.48, Chef DK 3.4.38
Succeeds on ChefDK 3.1.0

Platform Version

Windows 10

Replication Case

run knife cookbook metatdata from file ./metadata.rb from within a cookbook directory.

Client Output

Traceback (most recent call last):
        8: from C:/opscode/chef-workstation/bin/knife:322:in `<main>'
        7: from C:/opscode/chef-workstation/bin/knife:322:in `load'
        6: from C:/opscode/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/bin/knife:24:in `<top (required)>'
        5: from C:/opscode/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/lib/chef/application/knife.rb:161:in `run'
        4: from C:/opscode/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/lib/chef/knife.rb:220:in `run'
        3: from C:/opscode/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/lib/chef/knife.rb:445:in `run_with_pretty_exceptions'
        2: from C:/opscode/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/lib/chef/local_mode.rb:44:in `with_server_connectivity'
        1: from C:/opscode/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/lib/chef/knife.rb:446:in `block in run_with_pretty_exceptions'
C:/opscode/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/lib/chef/knife/cookbook_metadata_from_file.rb:37:in `run': uninitialized constant Chef::Knife::CookbookMetadata (NameError)
Did you mean?  Chef::Knife::CookbookMetadataFromFile



This comment has been minimized.

Copy link

timio73 commented Mar 4, 2019

Update: only occurs if knife rehash has been run. Removing the plugin_manifest.json resolves the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.