From fe8f86d7edd570eb057b074497fedb2b78059500 Mon Sep 17 00:00:00 2001 From: Enjia Xu Date: Fri, 19 Feb 2021 01:08:31 -0800 Subject: [PATCH 1/3] test ENV change for S3 bucket name --- config/environments/production.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index f2ec8d88..c09949fe 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -91,7 +91,7 @@ config.paperclip_defaults = { storage: :s3, s3_credentials: { - bucket: ENV.fetch('S3_BUCKET_NAME'), + bucket: ENV["S3_BUCKET_NAME"], # ENV.fetch('S3_BUCKET_NAME') access_key_id: ENV.fetch('AWS_ACCESS_KEY_ID'), secret_access_key: ENV.fetch('AWS_SECRET_ACCESS_KEY'), s3_region: ENV.fetch('AWS_REGION'), From d3a72da5fa4218d2eeec0233d0e66dbb00d10e42 Mon Sep 17 00:00:00 2001 From: Enjia Xu Date: Fri, 19 Feb 2021 01:15:31 -0800 Subject: [PATCH 2/3] changed all ENV sytax --- config/environments/production.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index c09949fe..adbd4ec5 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -92,10 +92,10 @@ storage: :s3, s3_credentials: { bucket: ENV["S3_BUCKET_NAME"], # ENV.fetch('S3_BUCKET_NAME') - access_key_id: ENV.fetch('AWS_ACCESS_KEY_ID'), - secret_access_key: ENV.fetch('AWS_SECRET_ACCESS_KEY'), - s3_region: ENV.fetch('AWS_REGION'), + access_key_id: ENV["AWS_ACCESS_KEY_ID"], # ENV.fetch('AWS_ACCESS_KEY_ID') + secret_access_key: ENV["AWS_SECRET_ACCESS_KEY"], # ENV.fetch('AWS_SECRET_ACCESS_KEY') + s3_region: ENV["AWS_REGION"], # ENV.fetch('AWS_REGION') }, - s3_host_name: ENV.fetch('S3_HOST_NAME') + s3_host_name: ENV["S3_HOST_NAME"] #ENV.fetch('S3_HOST_NAME') } end From 7a878bf2146ece07a3bd3a78d42bf177dfdb1377 Mon Sep 17 00:00:00 2001 From: Enjia Xu Date: Fri, 19 Feb 2021 00:51:45 -0800 Subject: [PATCH 3/3] seeds to development --- db/seeds.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/seeds.rb b/db/seeds.rb index 249f17d6..25ea0b0d 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -57,4 +57,4 @@ puts "#{App.all.size} apps, #{Engagement.all.size} engagements" # login mockup -User.find_or_create_by YAML.load(File.read "#{Rails.root}/db/github_mock_login.yml") \ No newline at end of file +User.find_or_create_by YAML.load(File.read "#{Rails.root}/db/github_mock_login.yml")["development"]