From: Timothy Hunter Date: 2006-11-13T02:46:41+09:00 Subject: Re: RubyGems Issue Skeets wrote: >> Timothy Hunter wrote: >> Skeets wrote: >> > > >> Don't you mean "require 'rubygems'"? The "require" method causes a file >> to be loaded. The "include" method adds a module's constants, methods >> and module variables into the current module. >> > > Timothy, that is what i actually did, i just articulated it wrong. > > if i have rubygems installed, i should be able to automatically... > > irb> require 'rubygems' > > right? or is that wrong? do i need to do something else to make it > work? could it be confused about the gems directory path (or is > directory path irrelevant?)?. > > tia... > > > Probably you're doing nothing wrong. When "require" returns false it doesn't mean it failed, it only means that whatever you're requiring is already loaded. When require fails it raises an exception: ruby$ irb irb(main):001:0> require 'notthere' LoadError: no such file to load -- notthere from (irb):1:in `require' from (irb):1 irb(main):002:0> What this means is that you've already got "rubygems" loaded. At a guess I'd say that you have a RUBYOPT environment variable with the value "rrubygems" or something similar.