- From: Sam Darwin <
>
- To:
- Subject: [chef] library gem dependencies
- Date: Tue, 5 Mar 2013 01:28:34 -0800 (PST)
Let's say a cookbook library requires a gem called treetop (it could be any
gem
actually), and so it has this line:
require 'treetop'
I want to get that installed as a pre-requisite, and so I add this code into
the default recipe:
r = chef_gem "treetop" do
action :nothing
end
r.run_action(:install)
But apparently it won't get called soon enough. The library has errors
about
treetop missing.
As another attempt, I create a different cookbook called pre-requisites. I
add
the code "r = chef_gem "treetop" do" into the pre-requisites cookbook, and
have that as a cookbook dependency. Nope. This also doesn't get called
soon
enough. treetop is missing. Installing the treetop gem by hand will fix
it.
The issue seems to be with a library and not with a recipe file, that is the
twist.
- [chef] library gem dependencies, Sam Darwin, 03/05/2013
Archive powered by MHonArc 2.6.16.