Hello,
I’ve been struggling for well over 6 hours which qualifies me as
being allowed to post a question to the list.
I am trying to get my Rails application to run under Apache. It works
fine with WEBrick. Apache is failing in both the cgi and fastcgi modes.
Configuration: Rails 0.14.3, Apache 2.0.50, Ruby 1.8.3, Postgres 8.1,
fcgi-2.4.0, ruby-fcgi-0.8.6.1, SaltedHashLoginGenerator
The permissions all seem to be fine (0755 on the dispatch.* files,
although many variations succeeded and failed as expected) and the
path to Ruby is correct (#!/usr/local/bin/ruby)
No matter what I do, I get the dreaded “Application error Rails
application failed to start properly” error. Some of the interesting
things I’ve found include:
When I run public/dispatch.rb, public/dispatch.cgi, and public/
dispatch.fcgi I get a “Status: 500 Internal Server Error”. Is this
normal?
How about this excerpt from the console, entering the contents of
dispatch.cgi line-by-line, and then trying variations until things work:
Loading development environment.
require File.dirname(FILE) + “/…/config/environment” unless
defined?(RAILS_ROOT)
=> nilrequire File.dirname(FILE) + “/…/config/environment”
/usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/initializer.rb:
222: warning: already initialized constant Controllers
=> truerequire “dispatcher”
=> trueADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if
File.directory?(dir) } if defined?(Apache::RubyRun)
=> nilADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if
File.directory?(dir) }
NameError: uninitialized constant ADDITIONAL_LOAD_PATHS
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.3/
lib/active_support/dependencies.rb:200:in `const_missing’
from (irb):4Dispatcher.dispatch
Status: 500 Internal Server Error
=> 35
Does this make sense? I get the same kind of error from the .fcgi:
Loading development environment.
require File.dirname(FILE) + “/…/config/environment” unless
defined?(RAILS_ROOT)
=> nilrequire File.dirname(FILE) + “/…/config/environment”
/usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/initializer.rb:
222: warning: already initialized constant Controllers
=> truerequire ‘fcgi_handler’
=> trueRailsFCGIHandler.process!
Status: 500 Internal Server Error
=> true
Strange that it replies “true”…
Does anyone have any idea? Will switching to lighttpd allow me to
avoid this problem?
Thanks for your help,
Paul.
Its probably not an issues as it