On Sun, Oct 06, 2002 at 11:36:33PM +0900, MoonWolf wrote:
> see mod_ruby Documents
>  http://www.modruby.net/doc/index.en.html
> and
>  apache/ruby-run.rb , apache/eruby-run.rb
> 
> > Where is 'Apache::MyAppRun.instance' defined?
> > The only thing I see defined is 'MyApp#handler'.
> 
> I'm sorry, it is my mistake.
> 
> -    RubyHandler Apache::MyAppRun.instance
> +    RubyHandler Apache::MyApp.instance
> 
> # My English is weak. I do not want to use English not much.
> # I am good at Japanese.
> 

Ok, first things first. I have created the following tree
from my website:

  main_site
     + htdocs
         timetest.rhtml
     + ruby
         rubyapp.rb

I have the following in my http.conf file:

  <IfModule mod_ruby.c>
  RubyRequire apache/ruby-run
  RubyRequire apache/eruby-run
  RubyRequire apache/preload_timetest.rb
# this does   ^^^^^^^^^^^^^^^^^^^^^^^^^^
# not look right
 
  <Location /ruby>
    SetHandler ruby-object
    RubyHandler Apache::RubyRun.instance
    RubyHandler Apache::MyApp.instance
  </Location>

  <Files *.rhtml>
    SetHandler ruby-object
    RubyHandler Apache::ERubyRun.instance
  </Files>
  </IfModule>


From a web browser the following works:

  mysite/timtest.rhtml

The following does NOT work:

  mysite/preload_timetest.rb
  

I get a not found error.

Reading eruby-run.rb and ruby-run.rb does not help.

Am I right to think that a preloaded ruby script needs
to be in the RUBYLIB/apache path and not in the mysite/ruby
directory? If so, then what does the location directive above
have to do with setting up a preloaded ruby script?

Puzzled.

Jim

> -- 
> MoonWolf <moonwolf / moonwolf.com>
> 
> 
> 

-- 
Jim Freeze
----------
Programming Ruby 
 def initialize; fun; end
A language with class