On 8/16/04 5:47 PM, "Robert Feldt" <feldt / ce.chalmers.se> wrote:

> Hi,
> 
> Sorry if this is obvious; I haven't really been following the RubyGems
> hopla. However, I searched but didn't find an answer so here goes...
> 
> Shouldn't "gem install X --install-stub" work recursively so that not
> only the top-level loading of the gem is done but it also works for
> files deeper down in the dir?
> 
> Example:
> 
> gem install net-ssh --install-stub

FYI: As of the next version, the stub is default so... --install-stub is not
longer necessary.

> 
> install net/ssh.rb which is stub that loads the gem. However, when I
> have installed net-ssh I would expect
> 
> require 'net/ssh/sftp'

This is interesting.  Knowing that the stub first loads rubygems, then does
a require_gem, we could do a few things:

1) allow the developer to specify which stubs get generated which target
files under their path:

gemspec.stubs = ['net/ssh', 'net/ssh/sftp']

Or...

2) have a person have to do:

require 'net/ssh'
require 'net/ssh/sftp'

That will currently work.

I like the former for a long term fix though...but this does force an order
by a library author on which files are directly "require'able".

> 
> to work out of the box. It currently doesnt.
> 
> Any plans to fix this or am I missing something?
> 
> /Robert Feldt
> 
> 
>