From 896e7eb175ca4115303b93ff2b427efc9b7cc69c Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 16 Oct 2015 09:46:40 -0400 Subject: [PATCH] Add S3 config to production for paperclip --- config/environments/production.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/environments/production.rb b/config/environments/production.rb index 4964c5a..1ac8424 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -76,4 +76,14 @@ Rails.application.configure do # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false + + # paperclip + 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'] + } + } end