> How do I configure mod_ruby to run with a cached script?

---------------------------------------------------------------------
httpd.conf:
<IfModule mod_ruby.c>
  RubyRequire apache/ruby-run
  RubyRequire apache/eruby-run
  RubyRequire apache/myapp # Add

  <Location /myapp>
    SetHandler ruby-object
    RubyHandler Apache::MyAppRun.instance
  </Location>

  <Files *.rbx>
    SetHandler ruby-object
    RubyHandler Apache::RubyRun.instance
  </Files>

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

---------------------------------------------------------------------
RUBYLIB/apache/myapp.rb:
require 'singleton'

class MyApp
  include Singleton

  def handler(r) 
    # r = Apache::Request instance
    # see http://www.modruby.net/doc/classes.en.html#label:7
    <myapp script>
    return Apache::OK
  end
end

-- 
MoonWolf <moonwolf / moonwolf.com>