On 5/6/06, Jacob Fugal <lukfugl / gmail.com> wrote: > On 5/6/06, Leslie Viljoen <leslieviljoen / gmail.com> wrote: > > The other thing is that a gem or library should not be loaded unless I > > "require" it. This was the Glue problem. So unless I say "require", > > what is not listed in the "built in classes and modules" part of the > > Ruby manual should not be part of my environment. > > This is already the way it is done. No libraries are loaded until > required. Not even from the standard library. The only ones there > without an explicit require are the core libraries. (Standard library > only means that the library is always *present*, ready to be required, > without you needing to install anything -- unless you're on some older > flavors of debian/ubuntu). > > If the library's being loaded, it's because *someone* is requiring it. > Obviously, in the case mentioned, it wasn't the end user; not > directly, anyways. But some library the *was* included directly was > including Glue *for* them. Probably with some fancy logic that says, > "Well, if Glue's not available, we can do it ourself, no need to make > them install it... but if Glue *is* available, let's use it!" So the > application worked without Glue being installed, but as soon as Glue > was installed, it got required into the project automatically. Not > because Ruby sucked it in automatically, but because some other > library did. I guess Rails did it. There's this ticket: http://dev.rubyonrails.org/ticket/2255 which may give a clue to the problem, but I don't understand it. I previously had the discussion about Glue and Rails here: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/164440 On Kubuntu I have Ruby 1.8.3 installed and if I print out $" I get nothing, indicating no "features" have been loaded. On windows, Ruby 1.8.4 and the 1-click installer, I get 25 files, including a lot from rubygems, forwardable.rb, time.rb, parsedate.rb, format.rb, rational.rb, openssl.rb, and fcntl.rb. Where did all that come from? How did those files get loaded?