- From: Mike <
>
- To:
- Subject: [chef] Re: chef 0.10.6 and chef_gem
- Date: Sun, 5 Aug 2012 09:36:17 -0400
A couple of ways:
1. Use chef_gem cookbook [1]
2. Use the 'trick' [2] method like so:
r = gempackage "f5-icontrol" do
source "#{Chef::Config[:file_cache_path]}/f5-icontrol-10.2.0.2.gem"
action :nothing
end
r.runaction(:install)
I would recommend using #1, as this will make your code a little more
consistent when you upgrade to the new version of Chef.
-M
[1]:
http://ckbk.it/chef_gem
[2]:
http://www.opscode.com/blog/2009/06/01/cool-chef-tricks-install-and-use-rubygems-in-a-chef-run/
On Sun, Aug 5, 2012 at 9:32 AM, Jesse Campbell
<
>
wrote:
>
well chef_gem didn't exist in 0.10.6, but we haven't upgraded yet, and
>
i'm running into a problem...
>
>
I want to do something like this:
>
>
gem_package "f5-icontrol" do
>
source "#{Chef::Config[:file_cache_path]}/f5-icontrol-10.2.0.2.gem"
>
end
>
>
require 'f5-icontrol'
>
>
But I get an error... f5-icontrol cannot be included by the recipe,
>
because it isn't installed yet... it isn't installed yet because the
>
recipe requires... you get the idea.
>
>
Is there a chef 0.10.6 way of doing this? the docs say to do it with
>
chef_gem.
>
>
thanks!
Archive powered by MHonArc 2.6.16.