diff options
Diffstat (limited to 'contrib/index.cgi')
-rw-r--r-- | contrib/index.cgi | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/contrib/index.cgi b/contrib/index.cgi index 6e948fb..d9dd132 100644 --- a/contrib/index.cgi +++ b/contrib/index.cgi @@ -6,9 +6,22 @@ ### Licsense: same as Erubis ### -require 'erubis' -include Erubis::XmlHelper +## add directory path where Erubis installed +#$LOAD_PATH << "/home/yourname/lib/ruby" +## load Erubis +begin + require 'erubis' + include Erubis::XmlHelper +rescue LoadError => ex + print "Status: 500 Internal Server Error\r\n" + print "Content-Type: text/plain\r\n" + print "\r\n" + print "ERROR: #{ex.message}" + exit +end + +## configuration ERUBY = Erubis::Eruby # or Erubis::EscapeEruby @encoding = nil @layout = '_layout.rhtml' |