[chef] chef_gem clarification


Chronological Thread 
  • From: Mathieu Martin < >
  • To: " " < >
  • Subject: [chef] chef_gem clarification
  • Date: Sat, 11 May 2013 14:37:54 -0400

Just expanding on Jeff's point: chef_gem and gem_package have different purposes.

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 provisioned.

Mat

On Saturday, May 11, 2013, Geoff Owen wrote:
Matt,

Wow, thanks a lot!  Totally what I was looking for!  I can't tell you how much I appreciate this!

Thanks again,

Geoff

On May 11, 2013, at 10:08 AM, Matt Ray < > wrote:

> Revisiting this "old" thread, take a look at the mysql::ruby recipe which does all this.
> https://github.com/opscode-cookbooks/mysql/blob/master/recipes/ruby.rb
>
> Thanks,
> Matt Ray
> Senior Technical Evangelist :: Opscode
> 512.731.2218 ::
> mattray :: GitHub :: IRC :: Twitter
>
> ________________________________________
> From: Geoff Owen
> Sent: Tuesday, May 07, 2013 4:30 PM
> To: Jeff Blaine;
> Subject: [chef] Re: chef_gem clarification
>
> Good point Jeff!
>
> Thank you!
>
> Geoff
>
> On 5/7/13 1:58 PM, "Jeff Blaine" < > wrote:
>
>>> I am having an issue where I am trying to do things "right".  I have a
>>> server I
>>> am building but the mysql gem is not installed.  So I am using chef_gem
>>> to
>>> install it.  However, I have other cookbooks that need to run before
>>> chef_gem
>>> (mainly one that installs a compiler).       I have tried to use the
>>> include_recipe
>>> to do this, but that didn't seem to do the trick.
>>
>> You may not want chef_gem but gem_package
>>
>> http://docs.opscode.com/resource_gem_package.html
>>
>> 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 LinkedIn, follow me on twitter @webmat, or check out my blog at programblings.com.

If you're a tech person, the following may make sense to you.

I'm the author of git_remote_branch. 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" section :-)




Archive powered by MHonArc 2.6.16.

§