I am a little familiar with running FCGI applications and have done some work in Perl.
Under Perl I can test it easily enough by running the script from command line with STDIN/STDOUT and command line args. But this doesn't work at all under ruby.
A different approach is needed.
Is there something I could do to simplify the testing/development of fcgi scripts under ruby instead of editing them in cgi-bin and trying to run them from there?
??
fortytwo :/var/www/html > cat ./env2.fcgi
#! /usr/local/bin/ruby
require 'rubygems' rescue nil
require 'fcgi'
require 'yaml'
FCGI.each_cgi{|cgi| cgi.out{ "<pre>#{ cgi.env_table.to_hash.to_yaml }</pre>" }}
fortytwo :/var/www/html > ./env2.fcgi </dev/null | head
Content-Type: text/html
Content-Length: 4037
<pre>---
XAUTHORITY: /home/ahoward/.Xauthority
GS_LIB: /home/ahoward/.fonts
SSH_ASKPASS: /usr/libexec/openssh/gnome-ssh-askpass
KONSOLE_DCOP_SESSION: DCOPRef(konsole-4421,session-4)
MAIL: /var/spool/mail/ahoward
KDEDIR: /usr
hth.
-a
ยทยทยท
On Tue, 25 Jul 2006, Tom Allison wrote:
I am a little familiar with running FCGI applications and have done some
work in Perl.
Under Perl I can test it easily enough by running the script from command
line with STDIN/STDOUT and command line args. But this doesn't work at all
under ruby.
A different approach is needed.
Is there something I could do to simplify the testing/development of fcgi
scripts under ruby instead of editing them in cgi-bin and trying to run them
from there?
--
suffering increases your inner strength. also, the wishing for suffering
makes the suffering disappear.
- h.h. the 14th dali lama