我按照此链接中的说明操作:https://devcenter.heroku.com/articles/paperclip-s3
我收到以下错误消息:
ActionView::Template::Error (missing required :bucket option):
它指向了这一行:
<%= image_tag company.profile_image.url %>
这些是我当前的文件
env.rb:
ENV['S3_BUCKET_NAME'] = 'goodlifecompanyimages'
ENV['AWS_ACCESS_KEY_ID'] = 'XXX'
ENV['AWS_SECRET_ACCESS_KEY'] = 'XXX'
development.rb:
Paperclip.options[:command_path] = "/usr/local/bin/"
config.paperclip_defaults = {
:storage => :s3,
:s3_credentials => {
:bucket => ENV['S3_BUCKET_NAME'],
:access_key_id => ENV['AWS_ACCESS_KEY_ID'],
:secret_access_key => ENV['AWS_SECRET_ACCESS_KEY']
}
}
谢谢!