Paperclip change images path after upgrade from 2.4 to 3.0.2

已查看 80 次
跳至第一个未读帖子

Jorge

未读,
2012年4月26日 18:39:382012/4/26
收件人 Paperclip Plugin

Hello people,

i have a problem with paperclip (3.0.2) after upgrade to rails 3.2
(from 3.0.10).

Originally the path of one image was:

"http://localhost:3000/system/photos/94/small/AudiLogo.jpg?1335392139"

and after the upgrade this kind of images never show again!, but if i
upload a new picture this will display fine on page, but the new path
that use is:

"localhost:3000/system/products/photos/000/000/094/smal/AudiLogo.jpg?
1335392139"

Whats happend in the upgrade ? There's any solution for convert the
olds path to new ?

I try with "rake paperclip:refresh:missing_styles" but dosen't works.

The paperclip config section it's this.

has_attached_file :photo,
:processors => lambda { |a|
if a.external?
[:thumbnail]
else
[:thumbnail,:watermark]
end
},
:styles => {
:slider => { :geometry => "350x312#", :format
=> :jpg, :watermark_path => "#{Rails.root}/public/images/
watermark.png", :position => "NorthEast" },
:small => "100x50>",
:medium => "200>x200",
:thumb => "100x100>",
:big => { :geometry => "640x480>", :format
=> :jpg, :watermark_path => "#{Rails.root}/public/images/
watermark.png" }
},
:default_url => "/images/noimage.png"


Any suggestion ?

Thanks in advance.
回复全部
回复作者
转发
0 个新帖子