【发布时间】:2015-09-30 04:42:28
【问题描述】:
我在模型中有以下代码:
has_attached_file :avatar,
path: ':class/:attachment/:id/:style/:basename.:extension',
:styles=> { :original => "500x500",
:small => "200x200"
}, default_url: "icons/user.png"
我还安装了 imagemagick。
which convert
/usr/bin/convert
开发中.rb
Paperclip.options[:command_path] = %w(/usr/local/bin/ /usr/bin/)
我还尝试了以下方法:
Paperclip.options[:command_path] = "/usr/bin/"
但是当我尝试上传图片时,它只保存原始文件。日志中的消息是:
[paperclip] saving user_profiles/avatars/53/original/2015-06-08-153213.jpg
我错过了什么?
【问题讨论】: