[Rubygems-developers] require hack

Chad Fowler chad at chadfowler.com
Fri Mar 26 11:04:08 EST 2004


On Mar 26, 2004, at 10:43 AM, Simon Strandgaard wrote:

> 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:
>       
> http://rubyforge.org/tracker/download.php/126/577/439/22/ubygems.rb
>
> 2)   Its necessary to the the environment variable
>      RUBYOPT=rubygems
>
> That should be it.
>
>
>
> BTW: The patch is carefully tested.. you may try for yourself:
> http://rubyforge.org/tracker/download.php/126/577/439/23/ 
> test_ubygems.rb
>
>

This is a cool hack, Simon!

> Chad



More information about the Rubygems-developers mailing list