From: Sarah Tanembaum Date: 2004-12-17T23:07:12+09:00 Subject: Re: Apache2, FastCGI and Rails on Windows Kent Sibilev wrote: > Oh, This is quite easy. I assume you have Ruby and RubyForApache installed. > > 1. Edit Apache's httpd.conf file by adding the following: > > LoadModule fastcgi_module modules/mod_fastcgi.so > > > AddHandler fastcgi-script .fcgi > > > 2. Create test.fcgi file in (for example) c:\Program Files\Apache > Group\Apache2\cgi-bin directory with this content: > > #!c:\ruby\bin\rubyw.exe > require 'fcgi' > counter = 0 > FCGI.each_cgi('html3') do |cgi| > counter += 1 > cgi.out { > cgi.html { > cgi.body { > cgi.h1 { "Hello World!" } + > cgi.p { "Counter: #{counter}" } > } > } > } > end > > 3. Hit http://localhost/cgi-bin/test.fcgi > > Cheers, > Kent. > > On Dec 16, 2004, at 1:47 PM, Sarah Tanembaum wrote: > >> How do you test if fastcgi is working? I know that the apache loaded >> the fastcgi modules correctly. Now, how do you configure fastcgi in >> Apache2 so it will work with ruby. Using just standard cgi, I can run >> ruby.cgi with no probs, except the startup time a bit longer than usual. >> >> Thanks. >> > > > May be I did something wrong. I have not been able to run fcgi, and yes, I did try your sample script. So, I test using 'irb' if there are error ... % irb LoadError: No such file to load -- fcgi from c:/apps/ruby/ruby-1.8/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in `require__' from c:/apps/ruby/ruby-1.8/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in `require' from (irb):1 irb(main):002:0> Any idea? Sarah