[Rubygems-developers] library stub again

Pierre Baillet oct at zoy.org
Wed Jun 9 19:41:03 EDT 2004


>From what I understood in the ml archives and in some examples, to
include in some code a gem'd library, one has to do something like:

require 'rubygems'
require_gem 'foo'

instead of 

require 'foo'

This means I have to alter all the program using this library to have a
custom version that is used whenever my gem is installed, doesn't it ?

I was wondering if there couldn't be some way (I don't have the answer,
that's why I'm asking, of course) to override the kernel require with
some special rubygem require so as to make the gems work on unmodified
application code... ?

Moreover, will I have to use the same construct from 'inside' a gem'd
library (imagine foo.rb was doing a require 'bar' and bar.rb is in the
same folder as foo), or is the require_gem altering the include path so
as to provide full access to other files in my gem ?

Thanks again, :-)
Pierre Baillet
S'il n'y pas de solution, c'est qu'il n'y a pas de problème
Devise Shadok

More information about the Rubygems-developers mailing list