title: Installing Gem into ChefDK via Chef
body: <p>I want to install a Gem (<a href="http://rubygems.org/gems/kitchen-docker" rel="nofollow">kitchen-docker</a>) into <a href="http://www.getchef.com/downloads/chef-dk/mac/" rel="nofollow">ChefDK</a>'s Gem path.</p>
  
  <p>What is the best way to install this Gem via Chef itself? Is there a more clever solution than the following?</p>
  
  <pre class="lang-ruby prettyprint-override"><code>execute "chef gem install kitchen-docker" do
    user "jenkins"
    not_if "chef gem list | grep ^kitchen-docker"
  end
  </code></pre>
  
  <p>Some background information: I want to use ChefDK in Jenkins on our CI server to do cookbook testing. The CI server itself should be provisioned by Chef, of course.</p>