From 3fadb46dcea3de2cb4cc92fbb7a4eb960ee02262 Mon Sep 17 00:00:00 2001 From: codycooperross <50597551+codycooperross@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:28:18 -0500 Subject: [PATCH] Add Paperclip options --- config/environments/development.rb | 3 ++- config/environments/production.rb | 1 + config/environments/stage.rb | 1 + config/environments/test.rb | 3 ++- config/environments/uat.rb | 1 + spec/models/provider_spec.rb | 1 + spec/requests/providers_spec.rb | 1 + 7 files changed, 9 insertions(+), 2 deletions(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index 6509a3e4e..de89657a3 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -44,7 +44,8 @@ config.flipper.memoize = false config.hosts << "lupo_web" - + + Paperclip.options[:image_magick_path] = "/usr/bin/" Paperclip.options[:command_path] = "/usr/bin/" end diff --git a/config/environments/production.rb b/config/environments/production.rb index f412f7a16..a78e4eaf4 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -78,6 +78,7 @@ }, bucket: ENV["AWS_S3_BUCKET"], } + Paperclip.options[:image_magick_path] = "/usr/bin/" Paperclip.options[:command_path] = "/usr/bin/" require "flipper/middleware/memoizer" diff --git a/config/environments/stage.rb b/config/environments/stage.rb index 5d786ea8e..96116fe1a 100644 --- a/config/environments/stage.rb +++ b/config/environments/stage.rb @@ -76,6 +76,7 @@ }, bucket: ENV["AWS_S3_BUCKET"], } + Paperclip.options[:image_magick_path] = "/usr/bin/" Paperclip.options[:command_path] = "/usr/bin/" require "flipper/middleware/memoizer" diff --git a/config/environments/test.rb b/config/environments/test.rb index f1abbd95c..d8621a808 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -55,6 +55,7 @@ # Bullet.counter_cache_enable = false # end config.log_level = :ERROR - + + Paperclip.options[:image_magick_path] = "/usr/bin/" Paperclip.options[:command_path] = "/usr/bin/" end diff --git a/config/environments/uat.rb b/config/environments/uat.rb index 1adcb10a1..46d104858 100644 --- a/config/environments/uat.rb +++ b/config/environments/uat.rb @@ -44,6 +44,7 @@ }, bucket: ENV["AWS_S3_BUCKET"], } + Paperclip.options[:image_magick_path] = "/usr/bin/" Paperclip.options[:command_path] = "/usr/bin/" require "flipper/middleware/memoizer" diff --git a/spec/models/provider_spec.rb b/spec/models/provider_spec.rb index d5d326106..7f860290a 100644 --- a/spec/models/provider_spec.rb +++ b/spec/models/provider_spec.rb @@ -96,6 +96,7 @@ subject { build(:provider) } it "with logo" do + pp Paperclip.options subject.logo = "data:image/png;base64," + Base64.strict_encode64(file_fixture("bl.png").read) diff --git a/spec/requests/providers_spec.rb b/spec/requests/providers_spec.rb index 5a0b445cc..e8efbfef0 100644 --- a/spec/requests/providers_spec.rb +++ b/spec/requests/providers_spec.rb @@ -304,6 +304,7 @@ it "creates a provider" do post "/providers", params, headers + pp Paperclip.options expect(last_response.status).to eq(200) expect(json.dig("data", "attributes", "name")).to eq("British Library")