간단한 이미지를 업로드하기 위해 PaperClip, AWS 및 s3_direct_upload 젬을 사용하고 있습니다. 여기이 자습서를 다음입니다 : http://blog.littleblimp.com/post/53942611764/direct-uploads-to-s3-with-rails-paperclip-and레일 4 - NoMethodError
파일이 S3에 업로드되어 있지만, 사후 처리하는 동안, 나는 다음과 같은 오류 얻을 :
여기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'
무엇 내 모델 ("선택") 모습입니다 like, 여기서 upload_file_name
을 정의해야합니다 : https://gist.github.com/dodinas/7237377
내가 뭘 잘못하고 있는지에 대한 아이디어가 있습니까? 매우 감사합니다!
코드가 멋지고 깨끗하고 좋은 스타일입니다. 아마도 프로덕션 환경에서 마이그레이션을 실행하지 않았거나 나중에 서버를 다시 시작하여 열 변경 사항을 가져 오지 않았기 때문일 수 있습니다. –