From: Jim Freeze Date: 2005-03-05T03:13:47+09:00 Subject: Re: ruby gems, and the require problem (was Re: RAA Status & b) * ES [2005-03-05 03:08:03 +0900]: > Chad, why does Gems need to override #require (or provide #require_gem)? > I haven't been able to find a concise explanation and I'd rather not > poke around source code. I'm not Chad, but... it's because $: (aka $LOAD_PATH) does not contain the gem path. ruby -e '$:.each { |i| p i }' "/lib/ruby/site_ruby/1.8" "/lib/ruby/site_ruby/1.8/powerpc-darwin7.7.0" "/lib/ruby/site_ruby" "/lib/ruby/1.8" "/lib/ruby/1.8/powerpc-darwin7.7.0" "." ls -alF /lib/ruby/ total 0 drwxr-xr-x 5 jdf jdf 170 27 Dec 09:13 ./ drwxr-xr-x 7 jdf jdf 238 26 Dec 17:17 ../ drwxr-xr-x 129 jdf jdf 4386 9 Jan 00:56 1.8/ drwxr-xr-x 3 jdf jdf 102 27 Dec 09:13 gems/ drwxr-xr-x 6 jdf jdf 204 2 Jan 09:33 site_ruby/ Jim Freeze Code Red. Code Ruby