title: Error when trying to invoke the rails command via Cygwin on windows (installed via railsinstaller)
body: <p>I have followed <a href="http://railsinstaller.org/" rel="nofollow">this tutorial</a> for installing ruby on rails on windows. (the steps are explained in the video in the middle of the page)</p>
  
  <p>If I run the rails command in a classic windows shell (<code>windows + r</code> > <code>cmd</code> > <code>enter</code>), it works fine. However, I would like to be able to invoke it in a cygwin shell. But if I do, for example: </p>
  
  <pre><code>$&gt; rails s # in cygwin
  </code></pre>
  
  <p>I have the following error:</p>
  
  <blockquote>
    <p>C:\RailsInstaller\Ruby1.9.3\bin\ruby.exe: No such file or directory --
    /cygdrive/c/RailsInstaller/Ruby1.9.3/bin/rails (LoadError)</p>
  </blockquote>
  
  <p>I've looked into this folder:<code>C:\RailsInstaller\Ruby1.9.3\bin\</code>, and there is indeed no rails.exe, but only a rails and rails.bat file.</p>
  
  <p>rails.bat looks like this:</p>
  
  <pre><code>@ECHO OFF
  IF NOT "%~f0" == "~f0" GOTO :WinNT
  @"ruby.exe" "C:/Projects/railsinstaller/stage/Ruby1.9.3/bin/rails" %1 %2 %3 %4 %5 %6 %7 %8 %9
  GOTO :EOF
  :WinNT
  @"ruby.exe" "%~dpn0" %*
  </code></pre>
  
  <p>I only know that cygwin looks for .exe files (for example, if you type <code>cp</code>, is it going to execute the <code>cp.exe</code> executable). I don't know how .bat files works.</p>
  
  <p>So do you know how I can make cygwin able to invoke the rails command ?</p>