From: mark Date: 2005-11-24T05:03:09+09:00 Subject: Re: debugging a cgi Hi Bob, The idea is to make debugging cgi's easier. Yes I can check it on another system, but it's a hassle. In addition to your suggestion here's what I came up with so far: I made a custom 500 error document called /500.rb and put: ---------------- #!/usr/local/bin/ruby print "Content-Type: text/plain\n\n" unless ENV["REQUEST_URI"] == "/500.rb" # to avoid recursion script = ENV["DOCUMENT_ROOT"] + ENV["REQUEST_URI"] puts `/usr/local/bin/ruby #{script} 2>&1` end ---------------- this doesn't deal with the get and post vars but I'll fix that later. It would be nice if there is a way to get ruby to bomb to the 500 page on exceptions so that I don't need the 'rescue' on every page. right now the exception just causes ruby to quit without going to the 500 page Thanks for the input, - Mark