Created
February 22, 2015 00:10
-
-
Save charlesjohnson/e229efbb473aeba246c2 to your computer and use it in GitHub Desktop.
A dirty gem trick, install dependency gems without prompting the user if that's what they actually want.
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
begin | |
gem 'chef-api' | |
rescue LoadError | |
require 'rubygems/dependency_installer' | |
Gem::DependencyInstaller.new(Gem::DependencyInstaller::DEFAULT_OPTIONS).install('chef-api') | |
end | |
require 'chef-api' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment