Can't set up rails: dispatch.cgi failed


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:///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
[error] [client] Premature end of script headers:

The rewrite log has a string of actions ending with: - - [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 - - [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

Can anyone help?

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

Thanks in advance,


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 “

Application error

Rails application failed
to start p



require File.dirname(FILE) + “/…/config/environment” unless

require “dispatcher”

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

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