[Rubygems-developers] Reduce the gap between posix and Windows

Luis Lavena luislavena at gmail.com
Tue Apr 22 16:51:15 EDT 2008

Hello guys,

Some of you are aware of the new implementation of One-Click
Installer, which is based on MinGW (GCC) instead of current one based
in VC6.

Besides the huge noise around this, the move to MinGW is to ease the
path of tools, extensions and gem available in *nix to be usable on

Right now, i386-mswin32 (VC6) cannot be considered deprecated, since
lot of tools include patches to support it an even considered it the
only Windows platform. Also, until most of the tools properly builds
with the new version, both will be maintained.

Anyway, after this brief introduction, I want to ask and share
something we (Gordon Thiesfeld and I) were discussing on rubyinstaller
development list [1]: merge rubygems generated scripts and stubs into
one and only file (gemname.bat).

Right now RubyGems generates the Windows stubs that call the extension
less files (which contains the actual ruby script).

This is good for running gems from the command line, but fails when
using backticks or system calls from Ruby, since the look up method
used in Ruby prioritize extension less files over executable
(.bat/.cmd/.exe/.com) files. That's one of the reasons we are forced
to add '.bat' to every rake or system call that fires other commands
already installed by other gems.

Ruby bundled scripts workaround this merging both stub (.bat) and
script into the same file.

Another workaround will be hack what currently Ruby does, but that
will require a lot of approval which I see will not came soon (or

Doing this right now breaks lot of tests, since the presumption of
having two separate scripts will be gone... but this solves a lot of
problems, also reduce the issues when providing patches for other
projects too, since we can disregard the '.bat' regexp at some places.

What do you guys think?

[1] http://rubyforge.org/pipermail/rubyinstaller-devel/2008-April/000292.html
Luis Lavena
Multimedia systems
Human beings, who are almost unique in having the ability to learn from
the experience of others, are also remarkable for their apparent
disinclination to do so.
Douglas Adams

More information about the Rubygems-developers mailing list