下面是代碼商店拇指圖像的特定目錄中的回形針寶石
has_attached_file :image,
:path => ":rails_root/public/images/:id/:filename",
:url => "/images/:id/:filename",
:styles => { :small => "300x168>", :large => "1000x560>" }
這裏是我的控制檯日誌
Command :: PATH=/opt/imagemagick-6.9/bin:$PATH; file -b --mime '/tmp/2251fc5821941d6bd28b2ee3cb25bf7620150617-13080-1gg7ekt.png'
Command :: PATH=/opt/imagemagick-6.9/bin:$PATH; identify -format '%wx%h,%[exif:orientation]' '/tmp/2251fc5821941d6bd28b2ee3cb25bf7620150617-13080-197v1bm.png[0]' 2>/dev/null
Command :: PATH=/opt/imagemagick-6.9/bin:$PATH; identify -format %m '/tmp/2251fc5821941d6bd28b2ee3cb25bf7620150617-13080-197v1bm.png[0]'
Command :: PATH=/opt/imagemagick-6.9/bin:$PATH; convert '/tmp/2251fc5821941d6bd28b2ee3cb25bf7620150617-13080-197v1bm.png[0]' -auto-orient -resize "300x168>" '/tmp/2251fc5821941d6bd28b2ee3cb25bf7620150617-13080-197v1bm20150617-13080-8q41x9'
Command :: PATH=/opt/imagemagick-6.9/bin:$PATH; file -b --mime '/tmp/2251fc5821941d6bd28b2ee3cb25bf7620150617-13080-197v1bm20150617-13080-8q41x9'
Command :: PATH=/opt/imagemagick-6.9/bin:$PATH; identify -format '%wx%h,%[exif:orientation]' '/tmp/2251fc5821941d6bd28b2ee3cb25bf7620150617-13080-197v1bm.png[0]' 2>/dev/null
Command :: PATH=/opt/imagemagick-6.9/bin:$PATH; identify -format %m '/tmp/2251fc5821941d6bd28b2ee3cb25bf7620150617-13080-197v1bm.png[0]'
Command :: PATH=/opt/imagemagick-6.9/bin:$PATH; convert '/tmp/2251fc5821941d6bd28b2ee3cb25bf7620150617-13080-197v1bm.png[0]' -auto-orient -resize "1000x560>" '/tmp/2251fc5821941d6bd28b2ee3cb25bf7620150617-13080-197v1bm20150617-13080-q57vxf'
Command :: PATH=/opt/imagemagick-6.9/bin:$PATH; file -b --mime '/tmp/2251fc5821941d6bd28b2ee3cb25bf7620150617-13080-197v1bm20150617-13080-q57vxf'
Command :: PATH=/opt/imagemagick-6.9/bin:$PATH; file -b --mime '/tmp/2251fc5821941d6bd28b2ee3cb25bf7620150617-13080-1o3we23.png'
我需要小,大,原始圖像存儲到我的項目公開目錄但它只存儲原始文件
'@ user.image.url(:小)'它是什麼回報? –
你可以試試這個'rake paperclip:refresh CLASS = User' –