From: Sean Chittenden Date: 2001-10-05T02:52:46+09:00 Subject: [ruby-talk:22094] Re: problem with docs on mod_ruby Howdy. > I was installing mod_ruby the other night, and I came upon an error in > the documentation. I compiled mod_ruby to use eruby and then put the > requisite directives in the httpd.conf file from the documentation > provided by the maintainers of mod_ruby. Here was the stuff I put in > httpd.conf: > > > # for Apache::RubyRun > RubyRequire apache/ruby-run Ooh! Add the following lines: # for Apache::ERubyRun RubyRequire apache/eruby-run > # handle *.rhtml files as eRuby files > > SetHandler ruby-object > RubyHandler Apache::ERubyRun.instance > > > # handle *.rbx files as Ruby CGIs > > SetHandler ruby-object > RubyHandler Apache::RubyRun.instance > > > > Whereas, to make it work (to serve .rhtml files without HTTP 500 errors, > I should say), I had to change the RubyRequire line to the following: > > # for Apache::RubyRun > RubyRequire apache/eruby-run > > However, I don't see as to why I should have to do this, considering > that it should not affect Apache::ERubyRun at all. Anyone run into this > problem or something like it? It does because you need to load the Apache::ERubyRun class before you can have it run over a .rhtml file. Just add the two lines above to your conf and you're good to go. If you have any questions/problems w/ modruby, check out the mailing list modruby@modruby.net. -sc PS This is an uncommented/simlified version of what I'm running with RubyRequire apache/ruby-run RubyRequire apache/eruby-run SetHandler ruby-object RubyHandler Apache::RubyRun.instance SetHandler ruby-object RubyHandler Apache::ERubyRun.instance -- Sean Chittenden