载波错误 [英] CarrierWave Error

查看:43
本文介绍了载波错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到一个看起来像这样的错误:

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'

单击提交注册后。我正在使用Carrierwave,并遵循了使用它的步骤,但是仍然出现错误。

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

推荐答案

CarrierWave不支持 attribute_will_change!调用,至少我几次遇到此错误。请遵循如何:在 CarrierWave的Wiki 中,在挂载的上传器中检测新文件类似的功能。

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.

这篇关于载波错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆