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
# 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 (linked from carrierwave's known issues page):
Why is this RMagick call generating a segmentation fault?
I didn't want to install ImageMagick manually as suggested here:
carrierwave + mini_magick gems = not an image error
I'm using Homebrew. Help would be fantastic. Thanks.