Rectangle 27 0

why when i'm upload image using carrierwave in rails 4 database is rollback?

class Item < ActiveRecord::Base
  mount_uploader :image, ImageUploader

The carrierwave method mount_uploader needs to be added to the image field in the model like this:

You may be seeing this error message because Carrierwave hasn't been initialized in your model.