加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails-3 – CarrierWave错误

发布时间:2020-12-17 02:29:46 所属栏目:百科 来源:网络整理
导读:我收到一个看起来像这样的错误: 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' 点击提交后进行注册.我正在使用Carrierw
我收到一个看起来像这样的错误:

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并按照步骤使用它,但仍然有错误.

解决方法

CarrierWave不支持attribute_will_change!打电话,至少我碰到了几次这个错误.按照 How to: Detect a new file in a mounted uploader在 CarrierWave’s wiki的步骤提供类似的功能.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读