From: Alan Chen Date: 2002-01-17T06:06:55+09:00 Subject: Re: eruby does not output error message On Wed, Jan 16, 2002 at 03:14:45PM +0900, Shugo Maeda wrote: > Hi, > > At Fri, 11 Jan 2002 18:35:40 GMT, > Alan Chen wrote: > > This is how eruby/mod_ruby has always worked for me. If you find a > > nice way to redirect the error to the client browser for development, > > I'd like to know. > > (1) Please put the following script to docroot/ruby/server_error.rb. > > --- > r = Apache.request > > r.content_type = "text/plain" > r.send_http_header > print "RubyError: ", r.prev.uri, "\n\n" > print r.prev.error_message > --- > > (2) add the follwing lines to httpd.conf. > > --- > RubyRequire apache/ruby-run > > ErrorDocument 500 /ruby/server_error.rb > SetHandler ruby-object > RubyHandler Apache::RubyRun.instance > Options +ExecCGI > > > RubyRequire apache/eruby-run > > ErrorDocument 500 /ruby/server_error.rb > SetHandler ruby-object > RubyHandler Apache::ERubyRun.instance > > --- > > This is an undocumented feature, and may be changed in the > future version. > > Shugo > Is this a feature of mod_ruby-0.9.7? Right now, I'm using mod_ruby-0.9.6 and am getting errors indicating that message "uri" is not recognized. Once I get it working, this is just what I was looking for for eruby development. Thanks, -- alan -- Alan Chen Digikata LLC http://digikata.com