Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6.6
-
Fix Version/s: None
-
Component/s: Rails WAR Deployment
-
Labels:None
-
Environment:HideJRuby 1.6.6, Mac OS X 10.7.3 with OpenJDK 1.7.0 (build 1.7.0-u4-b225-20120116, 64-bit server VM build 23.0-b09, mixed mode), Ubuntu 11.10 (GNU/Linux 3.0.0-16-virtual i686) on Amazon EC2 with OpenJDK 1.6.0_23 (IcedTea6 1.11pre, 6b23~pre11-0ubuntu1.11.10.1, client VM build 20.0-b11, mixed mode, sharing)ShowJRuby 1.6.6, Mac OS X 10.7.3 with OpenJDK 1.7.0 (build 1.7.0-u4-b225-20120116, 64-bit server VM build 23.0-b09, mixed mode), Ubuntu 11.10 (GNU/Linux 3.0.0-16-virtual i686) on Amazon EC2 with OpenJDK 1.6.0_23 (IcedTea6 1.11pre, 6b23~pre11-0ubuntu1.11.10.1, client VM build 20.0-b11, mixed mode, sharing)
-
Number of attachments :
Description
When I upload a file via the file_field helper, the params hash in the controller is empty. If I'm creating a new record, the application behaves as if none of the form fields had been populated. If I'm editing an existing record, I get a routing error because the application doesn't see the "_method=put" hidden field.
Note that this only happens when the application is bundled as a WAR and deployed (in our case, to Apache Tomcat 7.0.25). If I run deploy the application through WEBrick (via "rails server"), it behaves correctly.
We've had exactly the same issue. We're running JRuby 1.6.6 with OpenJDK 1.6.0_18 using tomcat6 on a Debian Squeeze EC2 instance. We're using rails 3.2.0.
This first manifested itself as a CSRF token not matching error, but further investigation revealed that none of the params hash values are populated at all. The app works fine running on WEBrick and only breaks when we package it to a WAR and deploy to tomcat. Using Firebug, it looks as if the POST request is totally normal. The app works fine on tomcat so long as we're not doing a file upload (uploading text forms is fine). We've reproduced this error both locally and on EC2.