From: Eric Hodel Date: 2006-07-05T12:34:03+09:00 Subject: Re: ANN: RubyGems 0.9.0 Release On Jul 3, 2006, at 6:37 AM, Erik Veenstra wrote: > (Back in town...) > >>> I added better RubyGems 0.8.11 support to RubyScript2Exe, >>> this week. >>> >>> RubyGems 0.9.0 doesn't work with RubyScript2Exe... >> >> Why? > > It's complaining about a missing fileutils: > > .../lib/rubygems/custom_require.rb:21:in `require__': > No such file to load -- fileutils (LoadError) > > I did some more testing with more gems on different platforms. > The conclusion is twofold: a) The problem occurred with > RubyGems 0.8.11 as well (in combination with RubyScript2Exe > 0.4.4) and b) it doesn't occur with all gems (e.g. sqlite-ruby > is a problem, actionmailer isn't). Perhaps sqlite-ruby is an old format gem? It seems to be the > Requiring fileutils by hand is a (temporary) solution: > > require "rubygems" > require "fileutils" # <<< ADD THIS > require_gem "sqlite-ruby" > > A better solution would be to require fileutils from within > RubyScript2Exe if it knows that rubygems is required, but > fileutils isn't. However, that doesn't feel good... "Which > library next?" > > Which libraries are required conditionally by RubyGems? I think zlib and yaml are the only others for making require work. It is difficult to tell with just grep. > My proposition: Do not conditionally require libraries. Not > only because RubyScript2Exe won't find these libs, but because > it's usually not necessary to do so. (I know, there are > exceptions: It's either mysql or sqlite, not both at the same > time. But at least require them at startup time, please.) I, > personally, want my applications to behave properly once they > are started: I don't want my users to see any avoidable > "missing library" message. > > Statement: "All libraries should be loaded at startup time." > > Regarding Rails, as an example: It's not necessary to require > ruby-sqlite when the application only uses mysql. But why are > these libraries required when the application tries to access > the database and not at startup time? I don't know. > > gegroet, > Erik V. - http://www.erikveen.dds.nl/ > > PS: This particular problem is a RubyScript2Exe problem and > *not* a RubyGems problem. It's all my fault... > -- Eric Hodel - drbrain@segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com