Created
April 30, 2010 01:22
-
-
Save machu/384562 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: index.fcgi | |
=================================================================== | |
--- index.fcgi (revision 3594) | |
+++ index.fcgi (working copy) | |
@@ -1,4 +1,4 @@ | |
-#!/usr/bin/env ruby | |
+#!/usr/local/bin/ruby | |
# -*- coding: utf-8; -*- | |
# | |
# index.fcgi $Revision: 1.35 $ | |
@@ -9,6 +9,7 @@ | |
# You can redistribute it and/or modify it under GPL2. | |
# | |
require 'fcgi' | |
+begin | |
FCGI.each_cgi do |cgi| | |
begin | |
ENV.clear | |
@@ -17,6 +18,7 @@ | |
define_method(:new) { cgi } | |
end | |
dir = File::dirname( cgi.env_table["SCRIPT_FILENAME"] ) | |
+ STDERR.puts cgi.env_table["SCRIPT_FILENAME"] | |
Dir.chdir(dir) do | |
load 'index.rb' | |
end | |
@@ -26,3 +28,10 @@ | |
end | |
end | |
end | |
+rescue => e | |
+ open('debug.log', 'w') do |f| | |
+ f.puts e | |
+ f.puts e.backtrace | |
+ f.puts | |
+ end | |
+end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment