I am trying to use Amazon S3 for Paperclip attachments. First, I'm trying to get it to work in a development environment on my iMac.
I created Amazon = ndeavor-dev and ndeavor-pro buckets. In the code below, I replaced the name and keys of the bucket. I have a gem paperclip
and aws-sdk
.
The error I am getting is:
ArgumentError at /attachments missing required :bucket option
I tried this in my /environment/development.rb configuration:
config.paperclip_defaults = { :storage => :s3, :s3_protocol => 'http', :bucket => ENV['AWS_BUCKET'], :s3_credentials => { :access_key_id => ENV['AWS_ACCESS_KEY_ID'], :secret_access_key => ENV['AWS_SECRET_ACCESS_KEY'] } }
And I tried this (move: bucket):
config.paperclip_defaults = { :storage => :s3, :s3_protocol => 'http', :s3_credentials => { :bucket => ENV['AWS_BUCKET'], :access_key_id => ENV['AWS_ACCESS_KEY_ID'], :secret_access_key => ENV['AWS_SECRET_ACCESS_KEY'] } }
Thanks for the help!
source share