I was having trouble getting jekyll to work with Ruby using cygwin on Windows 7 64-bit. I had better results using rubyinstaller + devkit. It would be really nice if I could use the rubyinstaller ruby inside of cygwin.
However, I get the following message when I try to execute rake.
$ rake page name="pages/about.md" C:\Ruby193\bin\ruby.exe: No such file or directory -- /cygdrive/c/Ruby193/bin/rake (LoadError)
Is there any way to make rubyinstaller play nice with cygwin?
I just put a few of these in my .bash_profile:
alias gem=gem.bat
alias irb=irb.bat
alias rake=rake.bat
I never have any of the problems that Luis mentions.
The problem is cygwin converting all the scripts paths into cygwin paths (/cygdrive/...
).
There is no solution for that since the invoke of the script is made from bash over rake
scrip which invokes native Ruby.
There are a lot of other issues that cygwin will cause, and some are covered in RubyInstaller troubleshooting page
One alternative will be invoking rake.bat
directly, skipping cygwin shebang detection.
But cygwin doesn't like batch files, which forces you to do cmd.exe /C rake.bat
and that is a noisy command line.
The other alternative is install something like gem-exefy (gem install gem-exefy
) and generate executables for your installed gems (rake.exe
).
That way you invoke rake.exe
instead of letting cygwin figure it out.
Another alternative is use MSYS Bash (included in DevKit) instead of cygwin, which plays way better than cygwin one, but you will still have issues with batch files.
As you can see, mixing non-native (cygwin) with native (RubyInstaller) have a lot of side-effects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With