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

NoMethodError: undefined method `inspec_gem' for cookbook: audit, recipe: inspec :Chef::Recipe #320

skylerto opened this Issue May 29, 2018 · 1 comment


None yet
1 participant

skylerto commented May 29, 2018

Cookbook version


Chef-client version


Platform Details

AWS EC2 Centos 7.5.1804


I'm trying to run the audit cookbook's default recipe.

Steps to Reproduce:

I have a compliance cookbook which depends on audit. It sets up some compliance info based on the platform and includes the audit cookbook.

Expected Result:

Successful convergence.

Actual Result:

Fails with undefined method.

Recipe Compile Error in /hab/svc/chef-base/data/cache/cache/cookbooks/compliance/recipes/default.rb

undefined method `inspec_gem' for cookbook: audit, recipe: inspec :Chef::Recipe
Did you mean?  inspect

Cookbook Trace:
  /hab/svc/chef-base/data/cache/cache/cookbooks/audit/recipes/inspec.rb:20:in `from_file'
  /hab/svc/chef-base/data/cache/cache/cookbooks/audit/recipes/default.rb:30:in `from_file'
  /hab/svc/chef-base/data/cache/cache/cookbooks/compliance/recipes/default.rb:22:in `from_file'

Relevant File Content:

 13:  #
 14:  # Unless required by applicable law or agreed to in writing, software
 15:  # distributed under the License is distributed on an "AS IS" BASIS,
 16:  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 17:  # See the License for the specific language governing permissions and
 18:  # limitations under the License.
 20>> inspec_gem 'inspec' do
 21:    version node['audit']['inspec_version']
 22:    source node['audit']['inspec_gem_source']
 23:    action :nothing
 24:  end.run_action(:install)

System Info:
ruby=ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]

This comment has been minimized.

skylerto commented May 29, 2018

Whoop, just me being a tool. 😞

@skylerto skylerto closed this May 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment