From: p_hilton@... (Phillip Hilton) Date: 2001-08-30T03:02:21+09:00 Subject: [ruby-talk:20547] CGI in Ruby with Apache and Exec Hello, I am a newbie to the Ruby programming language. I have have found it to be very absolutly brilliant for everything I wish to do with two big exceptions. 1: I can't seem to run my Ruby CGI scripts through my apache web server (under windows). My Perl scripts run fine. I am having great trouble with this CGI in Ruby business. I have the pragmatic programmers book on Ruby and well phenomenal for other aspects of ruby programming (it has been a good friend to me during the past few weeks). As regards CGI in ruby......I still can't make the books basic examples work. My task: I am trying to pick up parameters from a form written in HTML and then pass out the processed data in HTML. I have had a good old go but I keep getting '500 Internal server error'. Does anyone have have links to a good tutorial for absolute monkeys like me! ______________________________________________________________________________ 2: I can't seem to manage to get 'exec' up and running. Here is my code where am I going wrong. Function: The parent passes 3 variables to multiple child processes. Each child is given the same regexpression but a differrent file to parse and a different file to write the matches into. The parent calls process.wait as many times as there are children. (Next part not shown) The parent then scoops up the results in an array for output in CGI format. _______________________________________________________________________________ bert=["c:\\westd\\westdb1.txt","c:\\westd\\westdb2.txt","c:\\westd\\westdb4.txt","c:\\westd\\westdb5.txt","c:\\westd\\westdb6.txt","c:\\westd\\westdb7.txt"] ernie=["c:\\westd\\resregmatch1.txt","c:\\westd\\resregmatch2.txt","c:\\westd\\resregmatch3.txt","c:\\westd\\resregmatch4.txt","c:\\westd\\resregmatch5.txt","c:\\westd\\resregmatch6.txt,""c:\\westd\\resregmatch7.txt"] re_str="((at[ct])|(act))" (0...bert.length).each {|i| exec ("c:\\westd\\cherub3.rb","#{re_str}", "#{bert[i]}", "#{ernie[i]}") if fork==nil} (0...bert.length).each{|i| i=i-1 Process.wait } I would appreciate any guidence that can be offerred. Regard. Phil Hilton Stressed Msc Bioinformatician at Exeter Uni, UK. P.s. I am running Ruby under windows. p.p.s I am running running Ruby ver 1.6.3