> "Erik Veenstra" <pan / erikveen.dds.nl> wrote in message
>
> > I just want to say that RubyScript2Exe 0.2.0 [1] has been
> > released. Both Windows and Linux are supported.
>
> Will this support all manner of 'require'd files, including
> those loaded by the gems require-hack?

Never worked with gems before...

I did a test (on Linux) with the progressbar example. Yes,
RubyScript2Exe detects progressbar.rb [1] and yes, it is
included in the executable [2]. But when the executable is run,
require_gem only searches for progressbar.rb in its own dirs,
not in the regular places. Resulting in an Gem::LoadError. If I
catch this exception, it does work. See below.

I'll have a look at it.

Thanks.

gegroet,
Erik V.

 [1] /usr/local/lib/ruby/gems/1.8/gems/progressbar-0.0.3/lib/progressbar.rb
 [2] ./lib/progressbar.rb

----------------------------------------------------------------

Development machine:

 [erik / devel]$ ruby rubyscript2exe.rb testgem.rb
 Tracing testgem...
 Gathering files...% |oooooooooooooooooooooooooooooooooooooooo| ETA:  00:00:00
 Copying files...
 Copying /lib/ld-linux.so.2 ...
 Copying /usr/local/bin/ruby ...
 Copying /scratch/testgem.rb ...
 Creating testgem.bin ...

Test machine:

 [erik / test1]$ ./testgem.bin
 Example progr: 100% |oooooooooooooooooooooooooooooooooooooooo| ETA:  00:00:00

----------------------------------------------------------------

 # Doesn't work.

 require 'rubygems'
 require_gem 'progressbar'

----------------------------------------------------------------

 # Does work.

 require 'rubygems'
 begin
   require_gem 'progressbar'
 rescue Gem::LoadError
   require 'progressbar'
 end

----------------------------------------------------------------