Action working with webrick, not with apache+fcgi


I have a stange problem that I don’t know how to solve.

My application is deployed and configured to use Apache and Fastcgi (I
use a hosting company).

It works ok except for some redirect where apparently the wrong route
is used.
I have tried on the same environment with webrick (with the command
script/server) and it works ok. I suspect a problem with Apache
configuration but don’t know how to diagnose.

Here is the configuration where the problem occurs:
I have a remote form which call an action as followed

<% remote_form_for :building, :url => created_path do |f| -%>

The action created is executed until it reaches the following
render :update do |page| page.redirect_to building_blocks_path
(@building) end

and instead of going to the index action of the blocks controller it
loops on the created action and there is nothing special in the log

  • Completed in 0.79187 (1 reqs/sec) | Rendering: 0.00394 (0%) | DB:
    0.73004 (92%) | 200 OK []
    and a 500 Internal Server Error in the javascript response (with the
    message in the ErrorDocument 500 in htaccess)
    (again this same code works well with webrick started on the same

Here is the htaccess used (and recommended by my hoster)
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 “

Erreur de l’application

L’application n’a
pas démarré, contacter l’administrateur”

Any advice for a solution would be very welcome


Sorry to be insistant but I am stuck with this problem and I don’t
know how to move forward.



Just for your information, I have found the issue.
The problem came from the fact that I had left a “puts” in my code and
apparently writting on the console with mod_fcgi makes the application


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