[Rubygems-developers] require hack

Simon Strandgaard neoneye at adslhome.dk
Fri Mar 26 16:05:06 EST 2004

Jim Weirich suggested a few improvements, which has been fixed.
Now it should work out of the box.

Purpose with this patch is to avoid 
  require 'randomlib'
has to be replaced by
  require 'rubygems'
  require_gem 'randomlib'
so that one can stick with good old require.

Follow these 2 steps

1)   Place the 'ubygems.rb' file somewhere in Ruby's path:

2)   Its necessary to the the environment variable

That should be it.

BTW: The patch is carefully tested.. you may try for yourself:

ATT: Weirich, How to test the "insert an extra require in case there
is no auto-require." ?   I don't think I understand the problem, so
its probably bad if I write the testcase. You are welcome to make such testcase.
Thanks one more time for taking your time trying it out.

Simon Strandgaard

More information about the Rubygems-developers mailing list