Action working with webrick, not with apache+fcgi

Hello,

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
redirection
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
except

  • Completed in 0.79187 (1 reqs/sec) | Rendering: 0.00394 (0%) | DB:
    0.73004 (92%) | 200 OK [http://int.notreimmeuble.com/created]
    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
    environment).

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
Thanks
Nicolas

Hello,

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

Nicolas

Hello,

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
fail

Nicolas