- From: Bryan McLellan <
>
- To:
- Subject: [chef] Re: What is the difference between the following following 2 gem installation methods?
- Date: Thu, 8 Mar 2012 09:38:22 -0500
On Thu, Mar 8, 2012 at 4:43 AM, Sachin Sagar Rai
<
>
wrote:
>
What is the difference between the following following 2 gem installation
>
methods?
>
>
gem_package "mysql" do
>
action :install
>
end
This is used to install a gem to your system, such as when you're
installing a Ruby application to run as a service.
>
r = gem_package "right_aws" do
>
version node['aws']['right_aws_version']
>
action :nothing
>
end
>
>
r.run_action(:install)
>
>
require 'rubygems'
>
Gem.clear_paths
This is used to install a gem immediately so you can use the gem in a
Chef recipe. In Chef 0.10.10+ this will be replaced by:
chef_gem "right_aws" do
version node['aws']['right_aws_version']
end
http://tickets.opscode.com/browse/CHEF-2879
Bryan
Archive powered by MHonArc 2.6.16.