【发布时间】:2013-02-06 08:26:47
【问题描述】:
自从升级到 Ruby 1.9.3、Rails 3.1.0.rc4 和 Paperclip 3.4.0 后,我的应用程序图像渲染出现了严重问题。
无论我为 Paperclip 提供何种设置变化,下面链接的 infile 都会出现模糊,如链接的 outfile 所示。
outfile 必须适合 620x412 as shown here 的框。
Link to output file this code generates
模型的完整代码如下...
class Propertyimage < ActiveRecord::Base
belongs_to :property
validates_presence_of :description
validates_presence_of :sortorder
has_attached_file :image, :styles => { :export => {:geometry => "620x412#", :quality => 100, :format => 'JPG'} },
:path => ":rails_root/public/system/:attachment/:id/:style/:filename",
:url => "/system/:attachment/:id/:style/:filename"
end
【问题讨论】:
标签: ruby-on-rails-3 imagemagick paperclip ruby-1.9.3