[Rubygems-developers] Specifying equivalent modules?

Jim Weirich jim.weirich at gmail.com
Wed Apr 18 00:35:25 EDT 2007

On 4/17/07, Charles Oliver Nutter <charles.nutter at sun.com> wrote:
> Is there a way in RubyGems today to specify that one of a number of
> modules would be considered equivalent, and to load whichever is
> actually present? So that during install, options could be presented for
> multiple named gems that provide the same functionality?

Would it work to just make platform dependent variants of the gems in
question? Currently, RubyGems will make you manually choose the right
platform (future versions will autoselect the correct platform for

Allowing a user to specify an "equivalent" gem is an interesting idea.
 I would not like to see it at gem definition time tho, I would rather
have it happen at installation time.  But what would constitute
equivalent?  Gems works pretty hard at keeping versions correct in
dependencies.  Would equivalent gems have to have synchronized
versions, or would we specify that version 1.0 of JXxxx is equivalent
to version 2.3 of RXxxx?  That could get confusing quickly.

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