回形针在Rails中生成错误的URL

时间:2014-06-17 16:16:31

标签: ruby-on-rails paperclip

我正在使用Rails 4.1和最新版本的Paperclip。但是,paperclip正在生成错误的URL,错过了部分路径:

http://s3-us-west-2.amazonaws.com/vigme/products/ \
image_s3s//original/35670.0.detail.jpg?1403020602

而不是:

http://s3-us-west-2.amazonaws.com/vigme/products/ \
image_s3s/002/058/083/original/35670.0.detail.jpg

我的回形针初始化程序包含:

Paperclip::Attachment.default_options[:path] = '/:class/:attachment/:id_partition/:style/:filename'
Paperclip::Attachment.default_options[:s3_host_name] = 's3-us-west-2.amazonaws.com'

我该如何解决这个问题?

0 个答案:

没有答案