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: > > <IfModule mod_ruby.c> > # 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 > <Files *.rhtml> > SetHandler ruby-object > RubyHandler Apache::ERubyRun.instance > </Files> > > # handle *.rbx files as Ruby CGIs > <Files *.rbx> > SetHandler ruby-object > RubyHandler Apache::RubyRun.instance > </Files> > </IfModule> > > 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 <IfModule mod_ruby.c> RubyRequire apache/ruby-run RubyRequire apache/eruby-run <Files *.rbx> SetHandler ruby-object RubyHandler Apache::RubyRun.instance </Files> <Files *.rhtml> SetHandler ruby-object RubyHandler Apache::ERubyRun.instance </Files> </IfModule> -- Sean Chittenden