Hello
I have a form (new/create) which works well in local, but not when
deployed where it keeps being redirected to the index action when I
submit.
Here is what I have done so far :
-
de-Ajaxified the form to be pure HTML
-
put a logger.info on the first line of the create action and
realised I did not pass through the action -
I have suppressed all the before_filter actions for this controller
and the application.rb -
the logs (log_level :debug) do not show a lot : the new action is
followed by an index action in the deployed app (the new is followed
by create [post] in local) -
I have looked at firebug traces and in the deployed environment I
have
POST buildings with a 301 moved permanently
followed by GET buildings
where in local I have
POST Buildings with a 200 ok -
With that I have suspected a problem with Restful_authentication,
because this is the only thing left that can cause this redirection,
but I can’t understand why and I don’t know what can I do to diagnose
further. -
Could it be a problem with the sessions (cookie based) ? I have
tried with database stored session but it is the same. -
I thought of a reserved word problem but the controller is called
buildings, and fields names are not reserved words
Notes
- I have also tested the deployed app on a computer which I never used
before for the app and the problem was the same. - I have done my deployment with webistrano/capistrano 1.4 on an
environment called “integration”, I have tried with an ftp deployment,
but it is the same - I use a freezed version of rails 2.1.0 (installed ruby is 1.8.6),
gems are UUID, Will_paginate and Macaddr - I can create a user, log in and if I inject data directly in through
SQL and phpMyAdmin, the other creation form (not building form) seems
to work. - I have checked the .htaccess and dispactch.fcgi
Any help to diagnose would be greatly appreciated because I am stuck
with that and I don’t know what can I do.
Thanks
Nicolas