title: Bundle install in subdirectory
body: <p>I want to setup a rake task that runs 'bundle install' in a subdirectory of the rake file.</p>
  
  <pre><code>sh "bundle install -somesortofoption #{DIRECTORY}"
  </code></pre>
  
  <p>I get an error if I do:</p>
  
  <pre><code>sh "cd #{DIRECTORY} &amp;&amp; bundle install"
  </code></pre>
  
  <p>Any ideas if there is an option in bundler to define the path to run install in? I can't see one?</p>
  
  <p>Thanks</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I've also tried this which changes the directory whilst in the rake file:</p>
  
  <pre><code>Dir.chdir("#{DIRECTORY}/") do
      sh "bundle install"
  end
  </code></pre>
  
  <p>However, this does not seem to call <code>bundle install</code> within this directory but in the parent directory, or at least uses the Gemfile from that parent directory. hmm.</p>
  
  <p><strong>I forgot to say that from the command line if I cd to the directory and <code>bundle install</code> it works fine!</strong></p>