[Rubygems-developers] library stub again

Ryan Leavengood mrcode1234 at yahoo.com
Thu Jun 10 15:05:30 EDT 2004

--- Richard Kilmer <rich at infoether.com> wrote:
> Ryan,
> It has been done, in several ways.  One was to replace the 'require'
> statement.  Like you said, this is easy, and its been proposed (see 'require
> hack' in previous posts).  The alternative, that we opted for instead, was
> to create a 'stub' file in the site_ruby directory for each gem (see
> --install-stub ...which is the default now, I think).  That stub does the
> requiring of rubygems, and require_gem of the gem itself so you can just do
> 'require'.  But that does not override the existing require statement.

OK, the stub technique sounds reasonable.  I did the require hack because the
original RubyGems gem files were not really "installed", they were just copied
into a directory that RubyGems knew about.

But I think it is important to make the use of gems completely transparent. 
The average user should not be able to tell if a library is a gem or a normal
library.  That was certainly one of my original goals in my prototype.
> When RubyGems reaches 1.0, and Matz agrees to get it in the distro, then,
> perhaps, we can modify the _REAL_ require source (in C) to do rubygems
> transparently.  We don't really want to bug him before that.

Yes long term that would be a good idea, but definitely not something we want
to worry about too early on.


Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.

More information about the Rubygems-developers mailing list