Fcgi

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?

On Tue, 25 Jul 2006, Tom A. wrote:

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{ “

#{ cgi.env_table.to_hash.to_yaml
}
” }}

fortytwo :/var/www/html > ./env2.fcgi </dev/null | head
Content-Type: text/html
Content-Length: 4037

---
   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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs