Errors when using paperclip plugin for rails in production. Image not being saved to server

前端 未结 1 1822
故里飘歌
故里飘歌 2021-01-23 18:21

I am running rails 3 and paperclip 2.3.4. In development on OS X every thing runs great but production there are some issues that I can\'t quite figure out. If anyone have sugge

1条回答
  •  终归单人心
    2021-01-23 19:15

    I feel a little bit lost with your code.

    If it really is a copy of your live code then the image.img probably would throw an exception in #last_img because it is probably not initialized (at least not in code you've provided). But it would raise a different kind of exception not a nil:NilClass

    In case that it's a typo and you ment @image.img then the question is same - what is a workflow of your controller - if it's called as it is then it would really throw nil:NilClass because there is not @image initialized anywhere in the code of #last_img

    And another thing - you are initializing local variable bowl there and there is no use of it?

    And last one, now in #create - where did @bowl came from? From provided code it should be always nil.

    0 讨论(0)
提交回复
热议问题