我正在将我的应用程序升级到Ruby 1.9上的Rails 3.2.我不得不放弃attachment_fu.Carrierwave似乎是明显的替代品.在这个阶段,我将文件上传到文件系统(还没有云文件).
我在Lion,XCode 4.3.2,安装了命令行工具.运行:
$ brew doctor
# Your system is raring to brew.
Run Code Online (Sandbox Code Playgroud)
我可以在此配置中上传和调整图像大小:
我可以在新配置中上传图片:
(后跟$ bundle update)但调整大小使用mini_magick返回此错误消息:
"File Failed to manipulate with MiniMagick, maybe it is not an image Original Error: MiniMagick::Invalid", where File is the carrierwave uploader.
Run Code Online (Sandbox Code Playgroud)
FileUploader包含:
include CarrierWave::MiniMagick
def store_dir .. end # the shipped default
process :resize_to_limit => [500, 600]
Run Code Online (Sandbox Code Playgroud)
我的附件类(带mount_uploader :file, FileUploader)是的父Portrait,ReferenceLetter …