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
chef_gem without specifying the phase is now deprecated.
This deprecation warning was added in Chef Client 12.1.0, and using
chef_gem without specifying a phase will become an error in Chef
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
chef_gem 'etcd' do compile_time true end
The second, and preferred, is to add a gem dependency in your cookbook metadata.
Was this page helpful?