Paperclip文档关于url选项:
You can choose to have the bucket’s name placed domain-style (bucket.s3.amazonaws.com) or path-style (s3.amazonaws.com/bucket).
看起来像设置实际上将桶的名称放置为域风格?我不能强制回形针来产生像bucket.s3.amazonaws.com而不是s3.amazonaws.com/bucket的网址.
解决方法
只要这样设置:
Paperclip::Attachment.default_options[:url] = ':s3_domain_url'
或者像这样:
Paperclip::Attachment.default_options.merge!( :url => ':s3_domain_url' )