问题
I'm clueless as to what's going on with this because I have another app on the same server that receives and saves uploads just fine.
No error messages, Paperclip even say's in the log it's saving the attachments.
But the attachments don't get saved.
Thoughts anyone?
Also how would I test for this using RSpec/Capybara, because apparently my tests don't cover this.
Running Paperclip 2.3.12, Rails 3.0.9, REE1.8.7
Production on RHEL5 / Apache , but runs on a different user than my other app's user.
Update I get the same silent fail on development too!
But my test's pass and I can see the image being uploaded with the tests.
回答1:
I believe you forget to add multipart
option to your form
:html => {:multipart => true}
so
<%= form_for @my_object, :html => {:multipart => true} do |f| -%>
...
<% end %>
来源:https://stackoverflow.com/questions/6681536/why-is-paperclip-failing-silently-in-production-development