Chris,
I''m getting the same error (uninitialized constant RailsFCGIHandler),
but with lighttpd. Did you have any luck solving the issue?
- Derek
On 8/31/05, Chris Hall
<christopher.k.hall-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hello,
>
> I''m new to Ruby/Rails/FCGI. I''m currently trying to
setup
> rails/apache/fcgi and am having some problems that I am not sure how
> to correct, as I am following all the instructions/tutorials by the
> book.
>
> I''ve installed all the necessary things to get rails/apache/fcgi
up and running.
>
> system: FC3 Linux, apache 2.0.53 (installed from source)
>
> Here is what I have done...
>
> installed apache (2.0.53, source, with DSO support)
> installed ruby (1.8.2, rpm package)
> installed rubygems (0.8.11, source)
> installed rails (0.13.1, via gems)
> installed fcgi (2.4.0, source)
> installed mod_fcgi (2.4.2, source)
> installed ruby-fcgi bindings (0.8.6.1, via gems)
>
> ist of local gems:
>
> actionmailer (1.0.1)
> actionpack (1.9.1)
> actionwebservice (0.8.1)
> activerecord (1.11.1)
> activesupport (1.1.1)
> fcgi (0.8.6.1)
> mysql (2.6)
> rails (0.13.1)
> rake (0.5.4)
> sources (0.0.1)
>
> i''ve created a sample Todo project (following one of the tutorials
and
> it works perfectly using WEBrick.
>
> i want to use an alias instead of virtual host, so i made the
> following changes to httpd.conf (in the appropriate places):
>
> httpd.conf:
>
> LoadModule fastcgi_module modules/mod_fastcgi.so
> ...
> <IfModule mod_fastcgi.c>
> FastCgiIpcDir /usr/local/apache/fcgi_ipc/
> </IfModule>
> ...
> Alias /Todo /home/chall/workspace/Todo/public
> <Directory /home/chall/workspace/Todo/public>
> AllowOverride All
> Order allow,deny
> Allow from all
> </Directory>
>
> i then made the necessary modifications to public/.htaccess,
> public/dispatch.fcgi:
>
> Todo/public/.htaccess:
>
> ...
> AddHandler fastcgi-script .fcgi
> AddHandler cgi-script .cgi
> Options +FollowSymLinks +ExecCGI
> ...
> RewriteEngine On
> # had to add RewriteBase otherwise apache looked for
> # dispatch.fcgi in DocumentRoot/home ???
> RewriteBase /Todo
> RewriteRule ^$ index.html [QSA]
> RewriteRule ^([^.]+)$ $1.html [QSA]
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
>
> # In case Rails experiences terminal errors
> # Instead of displaying this message you can supply a file here which
> will be rendered instead
> #
> # Example:
> # ErrorDocument 500 /500.html
>
> ErrorDocument 500 "<h2>Application error</h2>Rails
application failed
> to start properly"
>
> Todo/public/dispatch.fcgi:
>
> ...
> require File.dirname(__FILE__) + "/../config/environment"
> require ''rubygems''
> require_gem ''fcgi''
> RailsFCGIHandler.process! ''/tmp/Todo_fcgi_crash.log''
>
> i then restart apache for changes to take effect, and attempt to load
> localhost/Todo. the index.html page loads fine, but as soon as I try
> to go to localhost/Todo/list or anything other than the default index,
> i get the following in my apache error_log:
>
> [Tue Aug 30 09:05:56 2005] [warn] FastCGI: (dynamic) server
> "/home/chall/workspace/Todo/public/dispatch.fcgi" started (pid
4986)
>
/usr/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/dependencies.rb:186:in
> `const_missing'': uninitialized constant RailsFCGIHandler
(NameError)
> from /home/chall/workspace/Todo/public/dispatch.fcgi:27
> [Tue Aug 30 09:05:57 2005] [warn] FastCGI: (dynamic) server
> "/home/chall/workspace/Todo/public/dispatch.fcgi" (pid 4986)
> terminated by calling exit with status ''1''
> [Tue Aug 30 09:06:01 2005] [warn] FastCGI: (dynamic) server
> "/home/chall/workspace/Todo/public/dispatch.fcgi" restarted (pid
4988)
> [Tue Aug 30 09:06:02 2005] [warn] FastCGI: (dynamic) server
> "/home/chall/workspace/Todo/public/dispatch.fcgi" started (pid
4989)
>
/usr/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/dependencies.rb:186:in
> `const_missing'': uninitialized constant RailsFCGIHandler
(NameError)
> from /home/chall/workspace/Todo/public/dispatch.fcgi:27
> [Tue Aug 30 09:06:03 2005] [warn] FastCGI: (dynamic) server
> "/home/chall/workspace/Todo/public/dispatch.fcgi" (pid 4988)
> terminated by calling exit with status ''1''
>
/usr/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/dependencies.rb:186:in
> `const_missing'': uninitialized constant RailsFCGIHandler
(NameError)
> from /home/chall/workspace/Todo/public/dispatch.fcgi:27
> [Tue Aug 30 09:06:04 2005] [warn] FastCGI: (dynamic) server
> "/home/chall/workspace/Todo/public/dispatch.fcgi" (pid 4989)
> terminated by calling exit with status ''1''
> [Tue Aug 30 09:06:07 2005] [warn] FastCGI: (dynamic) server
> "/home/chall/workspace/Todo/public/dispatch.fcgi" restarted (pid
4990)
>
/usr/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/dependencies.rb:186:in
> `const_missing'': uninitialized constant RailsFCGIHandler
(NameError)
> from /home/chall/workspace/Todo/public/dispatch.fcgi:27
> [Tue Aug 30 09:06:08 2005] [warn] FastCGI: (dynamic) server
> "/home/chall/workspace/Todo/public/dispatch.fcgi" (pid 4990)
> terminated by calling exit with status ''1''
> [Tue Aug 30 09:06:08 2005] [warn] FastCGI: (dynamic) server
> "/home/chall/workspace/Todo/public/dispatch.fcgi" has failed to
remain
> running for 30 seconds given 3 attempts, its restart interval has been
> backed off to 600 seconds
> ...
> [Tue Aug 30 09:06:29 2005] [error] [client 127.0.0.1] FastCGI: comm
> with (dynamic) server
> "/home/chall/workspace/Todo/public/dispatch.fcgi" aborted: (first
> read) idle timeout (30 sec)
> [Tue Aug 30 09:06:29 2005] [error] [client 127.0.0.1] FastCGI:
> incomplete headers (0 bytes) received from server
> "/home/chall/workspace/Todo/public/dispatch.fcgi"
> [Tue Aug 30 09:06:29 2005] [warn] FastCGI: (dynamic) server
> "/home/chall/workspace/Todo/public/dispatch.fcgi" has failed to
remain
> running for 30 seconds given 3 attempts, its restart interval has been
> backed off to 600 seconds
> [Tue Aug 30 09:06:29 2005] [warn] FastCGI: (dynamic) server
> "/home/chall/workspace/Todo/public/dispatch.fcgi" has failed to
remain
> running for 30 seconds given 3 attempts, its restart interval has been
> backed off to 600 seconds
>
> note: the crash log i specified in dispatch.fcgi never gets created.
>
> any idea why this is happening and how to fix? let me know if i need
> to provide any additional information.
>
> thanks.
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
--
Derek Haynes
HighGroove Studios - http://www.highgroove.com
Atlanta, GA
Keeping it Simple.
404.593.4879