title: How do I run commands in a given directory in Ruby?
body: <p>First of all I like to say that I am absolutly begginer in Ruby and I need to do some modifications.</p>
  
  <p>Just to know, I am using windows 7.</p>
  
  <p>I have installed the Foundation 5 gem in my Ruby, but when I try to run the command <code>foundation new projectName</code> I am gettings the error <code>The system cannot find the path specified</code>.</p>
  
  <p>After a long research I have find that Foundation gem, is creating the project folder, then generating the appropriate files, and finally trying to run the command <code>bower install</code> from the parent folder, not from inside the project folder, that contains the <code>bower.json</code>.</p>
  
  <p>More specific, lets say I am in folder <code>C:\Test\</code> and I am running the command</p>
  
  <pre><code>foundation new myApp
  </code></pre>
  
  <p>The foundation gem, will build the folder <code>myApp</code> and inside this folder will generate all the required files.</p>
  
  <p>Finally, while I am in <code>C:\</code>, foundation gem, will try to run the command</p>
  
  <pre><code>bower install
  </code></pre>
  
  <p>while the <code>bower.json</code> located under the folder <code>C:\TEST\myApp\</code></p>
  
  <p>Currenly what I am doing, is to modify the <code>generator.rb</code> file from Foundation gem, to set the location of the file <code>bower.json</code>.</p>
  
  <p>I have try any of the following, but none working:</p>
  
  <pre><code>run("#{name/}bower install", capture: true, verbose: false)
  run("/#{name/}bower install", capture: true, verbose: false)
  </code></pre>
  
  <p>where <code>#{name}</code> in this example is the <code>myApp</code>.</p>
  
  <p>Is there any way to say "Change Directory and go to the project dir before run the command <code>bower install</code>" ?</p>
  
  <p>Can somebody please help me ?</p>