Posted on Oct 27, 2008

Handy Tip: Don’t mix One-Click Installer with Cygwin

I get lot of bug reports related to this issue, and I’ll like to explain that is not a bug in the software, but a bug in your setup.

Why? you may ask? because you’re mixing a native interpreter version of Ruby (One-Click built for Windows) with a posix emulation layer which is Cygwin.

That basically will end in several problems.

  1. Cygwin relies on shebangs of the scripts, Windows doesn’t. Since One-Click installer ships with several gems bundled, all those need to be fixed prior shipment.
  2. Building extensions will segfault (since you’re mixing a native program with a emulated extension) (if you succeeded in the compilation process.

The first point will fail always. If the shebang got fixed by default to /usr/bin/ruby it will not find it in /cygdrive/c/ruby/bin/ruby.exe and thus failing.

So, please, take this as good advice. If you want to use Cygwin, use it fully, including the bundled ruby version.

If you want Windows-native applications and libraries, use One-Click Installer.

If you miss bash and similar tools to mimic Linux, use MSYS instead of Cygwin.

Again: do not mix the environments, bad things happens doing it.