Created
November 15, 2012 15:49
-
-
Save thedeeno/4079307 to your computer and use it in GitHub Desktop.
Chef library which depends on pg gem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# <cookbook>/libraries/cluster.rb | |
begin | |
require 'pg' | |
rescue LoadError | |
# install dependencies using resources | |
... | |
# install pg to omnibus | |
p = chef_gem 'pg' do | |
action :nothing | |
end | |
p.run_action(:install) | |
require 'pg' | |
end | |
# my library code which depends on pg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment