-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Known Issues
This is a list of known issues in CarrierWave. If you have the time and ability to help come up with a better solution for these issues, your contributions would be most welcome!
As discussed in issue 249 and elsewhere, you may encounter problems when not using the mount_on option in a mounted uploader. Due to bug/feature/unexpected behavior in ActiveRecord, when loading records from database using associations it might happen that ActiveRecord tries to assign String value to uploader column. If this happens you need to rename database column (for example use file_identifier instead of file) and specify new name as mount_on option when mounting uploader.
If you get an error such as "Attachment failed to be processed" ensure that you have installed the relevant image manipulation library before installing the associated gem.
See issue 517 for details.
Read this Stack Overflow page and try uninstalling any prexisting installations and deleting your cache.
brew remove imagemagick
brew --cache imagemagick
brew install -f imagemagick --disable-openmp
# If we have this model
class MyModel < ActiveRecord::Base
mount_uploader :bam, BamUploader
...
before_save :set_bam
...
def set_bam
self.bam = File.open("bam")
end
end
# Then play
m = MyModel.new
m.save
# Result
m.bam # => nil
Looks like CarrierWave is doing its magic on before_save and our callback is executed after CarrierWave's. So if we do our business on after_validation, then all is happy.