[Rubygems-developers] packaging binary executables / etc

Jim Weirich jim at weirichhouse.org
Sat Feb 19 10:37:21 EST 2005

On Saturday 19 February 2005 02:59 am, Patrick May wrote:
> Hello,
> I am working on the next release of Narf.  This release of narf will
> contain a customized version of the ruby interpreter[1].  The Narf
> build scripts currently do a fine job of:
>    if windows
>      using a pre-compiled binary
>    else
>      compiling a new binary
>    end
>    installing this binary next to ruby.

I think what you want to do is create two gems.  One platform independent gem 
that does a compile and one platform specific gem that carries the binary for 
the specific platform for which it is targetted. 

I've done this with the x10 gem, providing a platform specific windows binary 
so windows folk don't have to compile.  It almost works OK but for the 
following exceptions:

(1) The  Rake gem build task doesn't support binary/platform specific gem 
creation.  That's an easy thing to fix (and to workaround).

(2) The gem install command gets a bit confused when there is both a platform 
independent and platform specific gem available with  the same version 
number.  This is on my short list of things to fix in gems. The short term 
fix is to given them different versions.

-- Jim Weirich    jim at weirichhouse.org     http://onestepback.org
"Beware of bugs in the above code; I have only proved it correct, 
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)

More information about the Rubygems-developers mailing list