On 10/11/05, Berger, Daniel <Daniel.Berger / qwest.com> wrote:
> > Berger, Daniel said:
> > > I guess I'll wait to ask at RubyConf why it couldn't just scan down
> > > the sitelibdir. :)
> >
> > How can you tell from sitedir whether a particular version of
> > a library has been installed?
>
> My preference would be that gems abort if the package is found *at all*
> in the sitelibdir, unless a "force" option is used.

You're happy to leave version compatibility to chance?

> However, you could also make a best guess: [snip code]
>
> This would rely on a convention of people defining a VERSION constant
> for classes, or a MODULE_VERSION for modules in their packages.  It's
> not guaranteed to work, I realize, but it's better than nothing IMHO.

Better than nothing, but not as good as simply installing the gem. 
Gems and tarballs are supposed to live in harmony.  If they don't,
it's a bug that needs to be fixed.

At the moment, gem asks your permission to install each dependency. 
The user can say "no" on a case by case basis.  They can make a more
reasonable assessment of whether the appropriate package is "already
installed" than gem can.

If gem introduces "best guess" behaviour, it will amplify the number
of cases where people conclude that this RubyGems thing is stuffing
them around.

Regards,
Gavin