The problem is that cygwin will convert all script paths to cygwin paths ( /cygdrive/... ).
There is no solution for this, since a script call is executed from bash on top of a rake script that calls its own Ruby.
There are many other problems that cygwin will cause, some of which are described in the RubyInstaller troubleshooting page.
One alternative will refer directly to rake.bat , skipping cygwin shebang detection.
But cygwin does not like batch files, which forces you to do cmd.exe /C rake.bat and this is a noise command line.
Another option is to install gem-exefy ( gem install gem-exefy ) and generate executable files for your installed gems ( rake.exe ).
This way you call rake.exe instead of letting cygwin figure it out.
Another alternative is to use MSYS bash (included in DevKit) instead of cygwin, which plays much better than cygwin, but you will still have problems with batch files.
As you can see, mixing non-native (cygwin) with native (RubyInstaller) has many side effects.
source share