From: Scott Barron Date: 2006-04-16T05:09:00+09:00 Subject: Re: Bug: Requiring "breakpoint" causes the entire Rails framework to load. ------=_Part_18313_8003387.1145131737262 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 4/15/06, Florian Gro=DF wrote: > > Alder Green wrote: > > > I'm working with: > > > > 1. Ruby 1.8.4 (i386-mswin32) > > 2. RubyGems 0.8.11 > > 3. Rails 1.1.2 (obtained through RubyGems) > > 4. ruby-breakpoint (0.5.0) > > > > Whenever I require 'breakpoint', the entire Rails framework gets > > loaded as well. > > > > I tried "gem uninstall rails", and then require 'breakpoint' returned > > false and didn't load Rails, but worked. I tried > > uninstalling/reinstalling ruby-breakpoint - didn't help. > > > > What should I do? I want to use breakpoint outside of Rails, but > > loading the entire Rails environment for that is pretty taxing: nearly > > 400 files are > > loaded, which takes several seconds each time. > > I'm the author of ruby-breakpoint and not exactly sure what is happening > there. The gem spec of ruby-breakpoint certainly doesn't include any > dependencies. I don't see why Rails would get loaded. > > One way to work around the problem might be to just copy the breakpoint > library files directly into your site-lib directory of Ruby. > > I'm not sure what is happening there, though. Perhaps the Rails people > have an idea what might be happening here? > > -- > http://flgr.0x42.net/ I'm no gems internals guru but it seems to me that when you require 'rubygems' all of the gems/**/lib directories are added to the path, and th= e rails gem has a lib/breakpoint.rb. When looking at the lib directories of most other gems, it looks like the rails gem has a fairly dirty lib/. -Scott ------=_Part_18313_8003387.1145131737262--