Hello nobu,

Wednesday, January 23, 2002, 9:35:30 PM, you wrote:

>> --main.rb--
>> $:.push '/my/dir/need/for/execution/of/loaded/script'
>> load( 'secondary.rb', true )
>> 
>> --secondary.rb--
>> require 'something/from/the/dir/above'
>> 
>> When secondary.rb loads it can't find file and raises exception... How to solve this?

nnsn> What exception?  How do you write required path?  I tried
nnsn> followings and it succeeded.

nnsn> # /tmp/main.rb
nnsn> $:.push '/tmp'
nnsn> load('secondary.rb', true)
nnsn> # /tmp/secondary.rb
nnsn> require 'third.rb'
nnsn> # /tmp/third.rb is empty
Yes, it is ok. It is my misunderstanding of mod_ruby. I add paths in
$:, but in handler they are lost...
---my_handler.rb---
$:.push '/something'
$:.push '/another/one'

....

module Apache
       class MyHandler
             def handler
                 ...
                 # here my paths included from above are lost. Why??
                 # I need to include them again, right?
             end
       end
end

I was speaking with Shugo Maeda about eruby-run, and want to ask smth.
I can execute some chunk of code in anonymous namespace (module) by
saving it into the temporary file and then call load( file, true ).
It is the way how eruby-run works, but it is very inefficient. Is
there another way to do the same? Saving and loading scripts makes my
scripts too slow...

-- 
Best regards,
 Eugene [team Enticla]                mailto:Eugene.Scripnik / itgrp.net