Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undefined method `image_will_change!' for CarrierWave on Heroku

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.

class Receipt < ActiveRecord::Base   mount_uploader :image, ImageUploader end  class ImageUploader < CarrierWave::Uploader::Base   storage :fog   def store_dir     "receipts/saved"   end end 

I have the cache_dir set appropriately as well according to the Carrierwave Wiki.

receipt.image = File.open "public/images/test.jpg" #works fine in development, fails in heroku 
like image 279
Sean Coleman Avatar asked Mar 30 '11 02:03

Sean Coleman


1 Answers

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

like image 52
Jack Dempsey Avatar answered Oct 18 '22 07:10

Jack Dempsey