On 7/22/04 9:05 AM, "Lyle Johnson" <lyle.johnson / gmail.com> wrote:

> On Thu, 22 Jul 2004 21:54:00 +0900, Lothar Scholz
> <mailinglists / scriptolutions.com> wrote:
> 
>> CH> The way I want to address this problem is to include RubyGems in the
>> CH> installer, and then encourage package authors to release their packages
>> in
>> CH> RubyGems format. Then getting ruby-postgres installed on your system
>> would
>> CH> be as simple as running the command "gem install ruby-postgres".
>> 
>> But this does still not help on binary extensions.
> 
> Sure it would, if the package authors provide both source and
> precompiled, "binary" gems for their packages. I don't know what
> specific issues come into play with the ruby-postgres package, but
> I've been experimenting with this in the alpha releases of FXRuby 1.2
> and it seems to be working well.
> 
> 

And, we are adding to Gems the ability to utilize the platform attribute
within the gemspec to select the appropriate binary vs. source gem (or give
the user the option) if provided.  So if Lyle puts:

fxruby-1.2.0.gem  
    #=> spec.platform = Gem::Platform::RUBY

fxruby-1.2.0-win32.gem
    #=> spec.platform = Gem::Platform::WIN32

It will pick (not based on the name, that is convention) the fxruby 1.2.0
for your platform if one exists.

If a Linux user did:

gem install -r fxruby

RubyGems would download fxruby-1.2.0.gem and it would build it (using the
extconf.rb, etc) upon install from source.

If a Windows user did:

gem install -r fxruby

RubyGems would download fxruby-1.2.0-win32.gem and it would just install (no
building necessary).

This automatic selection capability will be in Gems SOON (hopefully in a
week), but as Lyle said, you can currently build and install gems that are
binary but its a manual choosing process.

-rich