I’m trying to use Paperclip gem and store the documents on Amazon S3.
In my gemfile, I have:
gem 'paperclip'
gem 'aws-s3'
In my model, I have (with the correct bucket and keys):
has_attached_file :attach,
:storage => :s3,
:bucket => ENV['mybucket'],
:s3_credentials => {
:access_key_id => ENV['mykey'],
:secret_access_key => ENV['mysecretkey']
}
But, I get the following error:
Missing credentials
Any ideas?
Check if your
ENV['mykey']andENV['mysecretkey']environment variables are actually defined.