title: How do I specify the shell to use for a ruby system call?
body: <p>I am trying to run commands from ruby via <code>system</code> (or by using backticks), but am running into problems. When I try to call a command, the shell is unable to find it, even though I know it works if I call it straight. For example:</p>
  
  <pre><code>`zip`
  &gt;&gt; sh: zip: command not found
  </code></pre>
  
  <p>The problem seems to be that ruby is using the <code>sh</code> shell, in which <code>$PATH</code> is not set correctly, rather than <code>bash</code>, and I am not sure why. The user my application is running under is set up to use <code>bash</code> by default.</p>
  
  <p>Is there any way to tell ruby to use <code>bash</code> instead of <code>sh</code>?</p>