CarrierWave Error

廉价感情. 提交于 2019-12-22 08:59:29

问题


I get an error that looks like this:

   NoMethodError (undefined method `image_will_change!' for #<Bar:0x24ddda0>):
  app/controllers/bars_controller.rb:43:in `new'
  app/controllers/bars_controller.rb:43:in `create'

After I click submit for a registration. I am using Carrierwave and have followed the steps to using it, but still have an error.


回答1:


CarrierWave doesn't support the attribute_will_change! call, at least I ran into this error a few times. Follow the steps from How to: Detect a new file in a mounted uploader at CarrierWave's wiki which provide similar functionality.



来源:https://stackoverflow.com/questions/6822498/carrierwave-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!