Re: Gem install on Ubuntu 12


Hi Steve. Sorry for the confusion with the chef_gem cookbook. It provides
chef_gem compatibility for older versions of Chef and is no longer required
in versions of Chef 10.12.0 and greater.

The chef_gem resource is not deprecated, rather the chef_gem cookbook is
deprecated as of the 10.12.0 version of Chef. At that point the cookbook is simply a no-
op. On previous versions, it provides fixes for omnibus based installs in
0.10.10 and provides the actual resource for versions < 0.10.9.

With regards to chef_gem itself, the resource simply makes it easier for
working with gems required by cookbooks that are not meant for the system

  • Chris

Steve Bennett writes:

« HTML content follows »
On 23 July 2012 17:52, AJ Christensen
<> wrote:

I fear you’ve seen a case where an out of date cookbook in an old
version of a snapshot repository hasn’t been updated to use 'chef_gem’
resource to install gem to the Opscode Chef embedded Ruby

In the culprit recipe, if you change gem_package “pg” etc to chef_gem
"pg", that should remedy it!

Should gem_package be deprecated, then?

Most of the Opscode cookbooks on the community site have been updated
to support the new Omnibus based installations.

At Heavy Water, we developed the ‘chef_gem’ cookbook to allow “Forward
Compatibility” for ~> 0.10.0 to use the ‘chef_gem’ resource.

Whee, confusing.
From URL:

This cookbook is a transition cookbook aimed at helping move from the pre-
chef_gem era to the post chef_gem era. The chef_gem resource was introducde
in Chef 0.10.9, providing an easy mechanism for installing and using gems
required by Chef internally. When used within an omnibus installation,
chef_gems are installed within the embedded Ruby.

From the perspective of someone who just wants to get a cookbook to work,
this is a lot of confusing detail about the internals of Chef, gems, etc.
What is the “post-Chef_gem era”? Is chef_gem being phased out?