I am using the PaperClip, AWS, and s3_direct_upload gems to upload simple images. I am following this tutorial here: http://blog.littleblimp.com/post/53942611764/direct-uploads-to-s3-with-rails-paperclip-and
The file is uploaded successfully to S3, but during post-processing, I get the following error:
Completed 500 Internal Server Error in 973ms
NoMethodError (undefined method `upload_file_name=' for #<Choice:0x007f9ea60e02d0>):
app/models/choice.rb:60:in `set_upload_attributes'
app/controllers/choices_controller.rb:24:in `create'
Here is what my model ("Choice") looks like, where upload_file_name
should be defined: https://gist.github.com/dodinas/7237377
Any ideas on what I am doing wrong here? Thanks very much!
Did you run your migrations. You would get that error if the column doesnt exist on the table in the database.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.