[chef] Re: What is the difference between the following following 2 gem installation methods?


Chronological Thread 
  • From: Ranjib Dey < >
  • To:
  • Subject: [chef] Re: What is the difference between the following following 2 gem installation methods?
  • Date: Thu, 8 Mar 2012 15:32:27 +0530

the first one is triggered during execution stage, while the second one triggers in compilation stage. Compilation happens before execution. So, you can use the gem in all your chef resources if you trigger the gem installation via second method. 
read more here:
http://wiki.opscode.com/display/chef/Anatomy+of+a+Chef+Run


regards
ranjib

On Thu, Mar 8, 2012 at 3:13 PM, Sachin Sagar Rai < "> > wrote:
What is the difference between the following following 2 gem installation methods?

    gem_package "mysql" do
      action :install
    end

and

    r = gem_package "right_aws" do
      version node['aws']['right_aws_version']
      action :nothing
    end

    r.run_action(:install)

    require 'rubygems'
    Gem.clear_paths
    require 'right_aws'


-------------------------------------------
@millisami
~ Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np
http://nepalonrails.tumblr.com
Sent with Sparrow





Archive powered by MHonArc 2.6.16.

§