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

Eric Hodel drbrain at segment7.net
Tue Apr 22 19:51:56 EDT 2008


On Apr 22, 2008, at 13:51 PM, Luis Lavena wrote:
> 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).

Does this mean `gem install rake` would only produce a `rake.bat`  
instead of both `rake` and `rake.bat`?

Or `gem install tinderbox` (which has two executables) would have a  
`tinderbox.bat` that could invoke either executables via a subcommand?

(Would it be beneficial to add something like `gem execute rake` that  
would run the rake executable?)

> 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.

Ok, I think you mean the former.

> 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
> ever).

Whose approval?

> 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



More information about the Rubygems-developers mailing list