Just expanding on Jeff’s point: chef_gem and gem_package have different
chef_gem installs the gem in chef’s private ruby, so chef can connect to
MySQL. This is useful to set up the admin user’s password and other initial
setup, during the chef run, for example.
Then gem_package will install the mysql gem so it’s available on your
system ruby, for various scripts or applications, once the system is
On Saturday, May 11, 2013, Geoff Owen wrote:
Wow, thanks a lot! Totally what I was looking for! I can’t tell you how
much I appreciate this!
On May 11, 2013, at 10:08 AM, Matt Ray firstname.lastname@example.org wrote:
Revisiting this “old” thread, take a look at the mysql::ruby recipe
which does all this.
Senior Technical Evangelist :: Opscode
512.731.2218 :: email@example.com
mattray :: GitHub :: IRC :: Twitter
From: Geoff Owen
Sent: Tuesday, May 07, 2013 4:30 PM
To: Jeff Blaine; firstname.lastname@example.org
Subject: [chef] Re: chef_gem clarification
Good point Jeff!
On 5/7/13 1:58 PM, “Jeff Blaine” email@example.com wrote:
I am having an issue where I am trying to do things “right”. I have a
am building but the mysql gem is not installed. So I am using chef_gem
install it. However, I have other cookbooks that need to run before
(mainly one that installs a compiler). I have tried to use the
to do this, but that didn’t seem to do the trick.
You may not want chef_gem but gem_package
chef_gem installs the gem for use by Chef, not your system-wide Ruby.
I’m the founder of Rock Solid Ops Inc, a web consultancy.
My main fields of expertise are Ruby on Rails web development, DevOps and a
bit of mobile. If you need help scaling, understanding, securing or
managing your web infrastructure (Rails or not), get in touch!
Connect with me and read testimonials on my
follow me on twitter @webmat http://twitter.com/webmat, or check out my
blog at programblings.comhttp://www.programblings.com?utm_source=email+signature
If you’re a tech person, the following may make sense to you.
I’m the author of
A tool that’s been helping common mortals like me share git branches for 5
years. Downloaded 50 000 times.
I’ve also contributed to some of the popular libraries in the Rails, jQuery
and PhoneGap ecosystems:
paperclip, active_admin, jquery-ujs, jquery-rails, kaminari, AssetSync,
phonegap-plugin-facebook-connect, shoulda, woulda, jeweler.
If you visit them on GitHub, you’ll see my face in the "Contributors"