On Jun 13, 2006, at 3:45 PM, Gregory Brown wrote: > On 6/13/06, Eric Hodel <drbrain / segment7.net> wrote: >> On Jun 13, 2006, at 3:21 PM, Gregory Brown wrote: >> >> > I'm wondering if anyone knows an option I can put in my gemspec to >> > prevent rubygems from requiring all my dependencies as soon as I >> > require my library. >> > >> > It's okay that gems will inforce their dependencies, (throw an >> error >> > if the gems arent there), but I don't want them all to load at >> once. >> > >> > In my library, I've got a bunch of requires in my methods, and I >> want >> > them to require those libs only when they are called. >> > >> > so for instance : >> > >> > require "rubygems" >> > require "ruport" #depends on fastercsv, but should not load it at >> > this point >> >> ruport will be loaded here regardless of rubygems. > > That is not what I am referring to. I don't want fastercsv to be > loaded at this point. Obviously ruport will be loaded :) ruport loads fastercsv. > Since the require "fastercsv" is within the DataSet.load method there > is no reason why fastercsv should load at this point. Yes, there is. ruport required it. > It does not when I am not using gems. If you're using ruport you're using gems. ruport contains "require 'rubygems'" somewhere inside. -- Eric Hodel - drbrain / segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com