Running Rake under cygwin

01 Sep 2011

I had some problems with running rake under cygwin. I get the following error while trying to execute rake:
C:\Ruby192\bin\ruby.exe: No such file or directory – /cygdrive/c/Ruby192/bin/rake (LoadError)

Could it be that the problem is that the first line in rake:
#!/usr/bin/env ruby 
Will return C:\Ruby192\bin\ruby.exe

By being more explicit about what to run you can avoid the problem:


Comments or errors? Fork this post and do a pull request on github