[Rubygems-developers] loadpath manager bugs?

Gavin Sinclair gsinclair at soyabean.com.au
Fri Sep 3 10:33:14 EDT 2004


On Friday, September 3, 2004, 9:19:46 PM, Chad wrote:


> On Sep 3, 2004, at 3:49 AM, Gavin Sinclair wrote:

>> Here's what I'm getting with the latest CVS.
>>
>> This shows I don't have rake traditionally installed (or stubbed).
>>
>>   $ ruby -rrake -e ''
>>   ruby: No such file to load -- rake (LoadError)
>>
>> This shows I _do_ have it gem-installed.
>>
>>   $ ruby -rubygems -e 'require_gem "rake"'
>>   # no output or error
>>
>> This shows the loadpath manager failing to resolve it.
>>
>>   $ ruby -rubygems -rrake -e ''
>>   ruby: No such file to load -- rake (LoadError)
>>

> The problem is that the "-r" option of ruby (that you're trying to use
> in loading Rake) doesn't actually run the #require method that Rich has
> overridden.  It is instead totally implemented in "sub-Ruby" C code so
> there doesn't seem to be a way to hook it.  This is a known problem 
> case.

Sounds like a tricky one.  Only solution that comes to mind is
modifying Ruby such that a Ruby-redefinition of 'require' is
respected.  Not likely to happen, but now's the time _for_ it to
happen, with 1.8.2 round the corner.

Gavin





More information about the Rubygems-developers mailing list