Forum: Ruby on Rails Action working with webrick, not with apache+fcgi

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C7ce3af7050f4580f56654aa6d52a36e?d=identicon&s=25 Tranquiliste (Guest)
on 2009-03-11 08:14
(Received via mailing list)
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 "<h2>Erreur de l'application</h2>L'application n'a
pas démarré, contacter l'administrateur"

Any advice for a solution would be very welcome
Thanks
Nicolas
C7ce3af7050f4580f56654aa6d52a36e?d=identicon&s=25 Tranquiliste (Guest)
on 2009-03-12 11:50
(Received via mailing list)
Hello,

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

Nicolas
C7ce3af7050f4580f56654aa6d52a36e?d=identicon&s=25 Tranquiliste (Guest)
on 2009-03-19 09:40
(Received via mailing list)
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
This topic is locked and can not be replied to.