Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Cookbook generators failed to generate new cookbooks -- undefined method `metadata' #2374

Closed
bipinbachhao-lilly opened this issue Nov 8, 2019 · 2 comments
Labels
Triage: Duplicate Indicates an issue is a duplicate of other open issue. Type: Bug Doesn't work as expected.

Comments

@bipinbachhao-lilly
Copy link

Description

Cookbook generators failed to generate new cookbooks -- undefined method `metadata'

Briefly describe the issue

chef generate cookbook <cookbook_name> -b -g ./code_generator

fails

ERROR: Chef Infra failed to converge: undefined method metadata' for nil:NilClass from file /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/chef-15.4.45/lib/chef/cookbook_loader.rb:99:in load_cookbook'

ChefDK Version

chef --version
ChefDK version: 4.2.0
Chef Infra Client version: 15.1.36
Chef InSpec version: 4.7.3
Test Kitchen version: 2.2.5
Foodcritic version: 16.1.1
Cookstyle version: 5.0.0

Platform Version

MacOS 10.46
RHEL 7.7

Replication Case

chef generate generator code_generator
chef generate repo chef-repo -g code_generator

@bipinbachhao-lilly bipinbachhao-lilly added the Status: Untriaged An issue that has yet to be triaged. label Nov 8, 2019
@tyler-ball tyler-ball added Triage: Duplicate Indicates an issue is a duplicate of other open issue. Type: Bug Doesn't work as expected. and removed Status: Untriaged An issue that has yet to be triaged. labels Nov 8, 2019
@tyler-ball
Copy link
Contributor

Looks like a duplicate of chef/chef-cli#8 - going to close this. @bipinbachhao-lilly would you like to subscribe to that issue?

I could have sworn that we fixed this but cannot find a PR that indicates that - are you able to try with the latest version of ChefDK or Chef Workstation and see if you still have this issue?

@bipinbachhao-lilly
Copy link
Author

@tyler-ball,

I tried these versions of chef workstation and both have this issue. seems like this issue present in both ChefDK and Chef workstations

chef --version
Chef Workstation version: 0.11.21
Chef Infra Client version: 15.4.45
Chef InSpec version: 4.18.0
Chef CLI version: 2.0.0
Test Kitchen version: 2.3.4
Cookstyle version: 5.10.13


chef --version
Chef Workstation version: 0.11.36
Chef Infra Client version: 15.4.45
Chef InSpec version: 4.18.0
Chef CLI version: 2.0.0
Test Kitchen version: 2.3.4
Cookstyle version: 5.11.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Triage: Duplicate Indicates an issue is a duplicate of other open issue. Type: Bug Doesn't work as expected.
Development

No branches or pull requests

2 participants