Skip to main content

Deprecation: Chef Gem Compile Time (CHEF-3)

Originally, the chef gem resource always ran during the compile phase (see this section on Chef Infra Client runs for further details). It is now possible to control which phase the resource is run in. Calling chef_gem without specifying the phase is now deprecated.

This deprecation warning was added in Chef Infra Client 12.1.0, and using chef_gem without specifying a phase will become an error in Chef Client 13.

Remediation

There are two possible remediations.

The first is to set the compile_time property on the resource. To maintain the same behavior as before, the property should be set to true:

chef_gem 'etcd' do
  compile_time true
end

The second, and preferred, is to add a gem dependency in your cookbook metadata.

gem 'etcd'
Edit this page on GitHub

Thank you for your feedback!

×










Search Results