Topic: Rails on plesk+apache+fcgid


I am try to get RoR running with ruby 1.8.4, Rails 1.1.6, mod_fcgid 1.09, Apache 2, on CentOS 4.3.

When I browser to (definately with end slash) I get an application error. In the apache.log it say that dispatch.fcgi has ended prematurely, and in the development.log I get:

#-------------------- development.log
Recognition failed for ""^M
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.rb:522:in `recognition_failed'^M
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.rb:512:in `recognize!'^M
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in `dispatch'^M
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:150:in `process_request'^M
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:54:in `process!'^M
/usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:606:in `each_cgi'^M
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:53:in `process!'^M
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:23:in `process!'^M

dispatch.fcgi has the corrent path to ruby. And it seems to be running but it is not getting the "test" directive.

Any ideas? Thanks for your time.

Other files

#--------------- vhost.conf

SetEnv RAILS_ENV development
DocumentRoot /var/www/rails/app/public/
ErrorLog /var/www/rails/app/log/apache.log

<Directory /var/www/rails/app/public/>
   Options ExecCGI FollowSymLinks
   AddHandler fcgid-script .fcgi
   AllowOverride all
   Order allow,deny
   Allow from all

#------------- uncommented lines in .htaccess

AddHandler fcgid-script .fcgi
Options +FollowSymLinks +ExecCGI

RewriteEngine On

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

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

# ---- END

Re: Rails on plesk+apache+fcgid

I'm getting similar errors. If I run webrick my test app runs ok. So that leads me to believe that Ruby and Rails are installed ok on the server and the problem is with fast_cgi.

Re: Rails on plesk+apache+fcgid

From your error it looks like there may be a problem with your config/routes.rb file. Can you post that?

vinnie - rails forum admin

Re: Rails on plesk+apache+fcgid

I have been getting the error on Apache. Has this issue been resolved and what is the resolution?