Hi,

I'm trying to setup RoR on OpenBSD 3.9 with Ruby 1.8.4 and Apache 1.3.
I've setup Rails to run as a Virtual Host, and I can view the "Welcome
Aboard" page.  When I try to access http://<server>/category/ though, I
get an "Application error...Rails application failed to start properly"
message.  Apache.log has this error:

[error] (2)No such file or directory: exec of /todo/public/dispatch.cgi
failed
 [error] [client 192.168.2.128] Premature end of script headers:
/todo/public/dispatch.cgi

The rewrite log has a string of actions ending with:
192.168.2.128 - - [01/Aug/2006:18:06:21 -0700]
[todo/sid#8931257c][rid#86bbd034/initial] (4) RewriteCond:
input='/todo/public/images/rails.png' pattern='!-f' => not-matched
192.168.2.128 - - [01/Aug/2006:18:06:21 -0700]
[todo/sid#8931257c][rid#86bbd034/initial] (1) [per-dir /todo/public/]
pass through /todo/public/images/rails.png

I have the right path to ruby in .htaccess, have 755 permissions in my
public directory, and have edited .htaccess to route through
dispatch.cgi.

Can anyone help?

I've pasted my dispatch.cgi and .htaccess files below.

Thanks in advance,
Josiah

.htaccess
--------------
AddHandler fastcgi-script .fcgi
AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI

RewriteEngine On

RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.cgi [QSA,L]

ErrorDocument 500 "<h2>Application error</h2>Rails application failed
to start p
roperly"

dispatch.cgi
-----------------
#!/usr/local/bin/ruby

require File.dirname(__FILE__) + "/../config/environment" unless
defined?(RAILS_ROOT)

require "dispatcher"
#require
"/usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.4/lib/action_web_service/dispatcher"

ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if
File.directory?(dir) } if defined?(Apache::RubyRun)
Dispatcher.dispatch