Undefined method `image_will_change!' for CarrierWave on Heroku

后端 未结 3 1125
时光说笑
时光说笑 2021-01-31 13:40

I have a simple model that mounts a Carrierwave uploader. Everything works fine in development, but I get an undefined method \"image_will_change!\" error on heroku.

<         


        
相关标签:
3条回答
  • 2021-01-31 14:17

    It's probably because you forgot to run:

    rake db:migrate
    
    0 讨论(0)
  • 2021-01-31 14:34

    It's likely that your db on heroku doesn't have the image column in the receipts table.

    0 讨论(0)
  • 2021-01-31 14:36

    Even after running the migration on heroku, the error persisted.

    I found that a heroku restart command was required to vanquish the error forever.

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