On 12/5/06, Daniel Berger <[EMAIL PROTECTED]> wrote:
> Luis Lavena wrote:
> <snip>
>
> >> Ideally I'd like to be able to set this up as an either-or, with
> >> something like "gem install win32-service --from-source" to force a
> >> build if the user wants to build from source instead of using the
> >> binary.  Is such an option possible?
> >>
> >
> > Daniel,
> >
> > Based on rubygems documentation and experience, if you have two gems
> > with the same version, but both with different platforms (ruby and
> > mswin32), rubygems will offer you a choice on which one will be
> > installed.
> >
> > Basically, if you want the user build the native extensions by
> > himself, download the ruby version, any other case (ala no compiler),
> > download the prebuild gem.
>
> I thought about that, but I worry it will just confuse the newbs.  I can
> see it now - "Hey, which of these am I suppose to install?".  Assuming
> gems doesn't provide an alternative I'll just have to deal with it I guess.
>

The problem with gemspecs:

If you define something in "extensions", rubygems will try to run the
extconf for that extension.

To avoid that, extensions must be cleared (extensions.clear()) like we
are doing with mongrel gems:

http://rubyforge.org/viewvc/trunk/Rakefile?revision=441&root=mongrel&view=markup

Guess a notice / faq should be used to warn the user about this:

Q. When installing gem 'name', two versions are shown, which one
should I choose?

A. If you're a Windows user, mostly you don't have a compiler/build
environment like Visual C to compile and build the extensions bundled
with the gem. In that case, please choose the pre-built version
(marked as platform specific gem: mswin32).

-- 
Luis Lavena
Multimedia systems
-
Leaders are made, they are not born. They are made by hard effort,
which is the price which all of us must pay to achieve any goal that
is worthwhile.
Vince Lombardi
_______________________________________________
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users

Reply via email to