[chef] Re: Re: Re: Re: How to install a non-Ruby community gem with Chef?


Chronological Thread 
  • From: Guilhem Lettron < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: How to install a non-Ruby community gem with Chef?
  • Date: Thu, 31 Oct 2013 10:40:07 +0100

If you want to build a gem from a git repository (like github), you can use https://github.com/rdp/specific_install :
gem specific_install -l http://github.com/githubsvnclone/rdoc.git -b edge

I create a cookbook to do this with a LWRP (and a provider to gem_package... but not sure it really works): http://community.opscode.com/cookbooks/gem_specific_install

Guilhem Lettron


On Wed, Oct 30, 2013 at 5:48 PM, Torben Knerr < " target="_blank"> > wrote:

Can you maybe leverage bundler for that?

E.g. create a 'Gemfile' with contents (off the top of my head, might not be syntactically correct):
'''
source :rubygems

gem "mygem", "1.0", git: "https://github.com/someone/mygem.git", ref: "master"
'''

You could create the Gemfile and then shell out to 'bundle install' during the Chef run

HTH, Torben

On Oct 30, 2013 2:45 PM, "Eric Feldhusen" < " target="_blank"> > wrote:
What if I needed to build the gem from source since we're running different versions of Ruby?

Eric Feldhusen


On Wed, Oct 30, 2013 at 9:42 AM, Tom Duffield < " target="_blank"> > wrote:
The gem_package resource has a source parameter where you can specify a .gem file: http://docs.opscode.com/resource_gem_package.html

Tom Duffield — Automation Consulting Engineer

651.769.7497 –  " style="color:rgb(105,117,130)" target="_blank">  – my: Linkedin  Twitter

OPSCODE

CODE CAN

opscode.com   Blog   Facebook   Twitter   YouTube


On Wed, Oct 30, 2013 at 8:39 AM, Eric Feldhusen < " target="_blank"> > wrote:
How would I install a non-Ruby community gem with Chef?  Right now I'm trying to use a bash script, but if there's a way to install it with a Chef command, I'm thinking that would make more sense.

Any suggestions?

Eric Feldhusen






Archive powered by MHonArc 2.6.16.

§