Pergunta

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!

Foi útil?

Solução

Did you run your migrations. You would get that error if the column doesnt exist on the table in the database.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top