[Rubygems-developers] Suggestion: install library stub

Chad Fowler chad at chadfowler.com
Mon Apr 19 07:56:42 EDT 2004


On 18/4/2004, at 9:13 PM, Gavin Sinclair wrote:

> A quick one: I received an email from Sam Roberts asking all sorts of
> questions about RubyGems.  One of them was this:
>
>> Anyhow, would it be possible for when a gem is installed that the 
>> latest
>> version is always available by using 'require', so use of a library is
>> not dependent on its distribution method?
>
> What if, say when someone installs 'lafcadio' as a gem, then we end up
> with this:
>
>   $site_ruby/1.8/lafcadio.rb:
>
>     require 'rubygems'
>     require_gem 'lafcadio'
>
>

Not a bad idea at all.  I'm tempted to say let's do it, but I bet 
someone is going to come up with a reason not to. :)

> That's basically what happens with application gems right now, isn't
> it?  Is it worth extending it to libraries?
>
> There's a problem when someone does
>
>   require 'x/y'
>
> and we've only simulated
>
>   require 'x'
>
> but is that insurmountable?
>
>

As long as you've started with require 'lafcadio', require 
'lafcadio/something_extra' will work.

Of course, we could always use Simon's require hack to achieve a 
similar effect, couldn't we?

Chad



More information about the Rubygems-developers mailing list