carrierwaveuploader / carrierwave

Classier solution for file uploads for Rails, Sinatra and other Ruby web frameworks
https://github.com/carrierwaveuploader/carrierwave
8.78k stars 1.66k forks source link

Failed to manipulate with MiniMagick, maybe it is not an image? #746

Closed arta closed 12 years ago

arta commented 12 years ago

I am upgrading my app to rails 3.2 on ruby 1.9. I had to drop attachment_fu. Carrierwave seemed the obvious replacement. At this stage I am uploading files to the file system (no cloud files, yet).

I am on Lion, XCode 4.3.2, Command Line Tools installed. Running $ brew doctor returns: Your system is raring to brew.

I can upload and resize images in this configuration: rails 3.1.4 ruby 1.8.7 carrierwave 0.5.8 mini_magick 3.4

I can upload images in the new configuration: rails 3.2.3 ruby 1.9.3 (or 1.9.2) carrierwave 0.6.2 (followed by $ bundle update) but resizing using mini_magick returns this error message: "File Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: MiniMagick::Invalid", where File is the carrierwave uploader.

The FileUploader contains:

include CarrierWave::MiniMagick
def store_dir .. end # the shipped default 
process :resize_to_limit => [500, 600]

My Attachment class (with the mount_uploader :file, FileUploader) is a parent of Portrait, ReferenceLetter, and other attachment kind of classes. Each of the attachment classes inherits from the Attachment, is :polymorphic => true, and belongs_to :attachable (User) which, in turn, has_many :portraits, :reference_letters, etc. :as => :attachable.

None of these worked: http://stackoverflow.com/questions/2838307/why-is-this-rmagick-call-generating-a-segmentation-fault I didn't want to install ImageMagick manually as suggested here: http://stackoverflow.com/questions/9905499/carrierwave-mini-magick-gems-not-an-image-error

I'm using Homebrew. I'm not sure whether this should be under carrierwave or mini_magic, so I'm posting under both. Help would be fantastic.

Thanks, martin

bensie commented 12 years ago

This sounds like a problem with your ImageMagick installation.

arta commented 12 years ago

Hi James, ImageMagick passes all of the checks from here: http://www.imagemagick.org/script/binary-releases.php Also, when using gem rmagick (vs. mini_magick), everything works. Can the problem be my ImageMagick installation in spite of these results? Thanks, martin

bensie commented 12 years ago

Not sure. I am certain though that it is not a CarrierWave issue.

arta commented 12 years ago

Ok, thanks.

stoplion commented 5 years ago

Having same issue in now (2019) any fix for this?