Metadata chef_gem install

Hi, I’m having trouble using the ‘gem’ DSL method for cookbook metadata.

metadata.rb

name 'x'
description 'y'

gem 'HTTParty'

When I converge the cookbook I get:

-----> Starting Kitchen (v1.6.0)
-----> Converging <web-windows-2012r2>...
       Preparing files for transfer
       Preparing dna.json
       Resolving cookbook dependencies with Berkshelf 4.3.0...
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #converge action: [Could not find 'HTTParty' (>= 0) among 305 total gem(s)

It looks like it’s just searching the already installed gems rather than installing them via chef_gem.

Thanks in advance,
Dan

1 Like