Skip to content

Commit

Permalink
Fix attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
avinhurry committed Jul 25, 2024
1 parent 83114a5 commit 3ace7e7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,10 @@ group :test do
end

group :development, :test do
gem 'dotenv-rails', require: 'dotenv/load'
gem 'brakeman'
gem 'bullet', require: false
gem 'db-query-matchers'
gem 'dotenv-rails', require: false
gem 'parallel_tests'
gem 'pry-byebug'
gem 'pry-rails'
Expand Down
8 changes: 1 addition & 7 deletions app/lib/hosting_environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,7 @@ def self.application_url
if Rails.env.production?
"https://#{hostname}"
else
require 'dotenv/rails'
# Foreman will override $PORT to 3100, 3200 etc depending on position in
# the Procfile. This means that e.g. emails sent via Sidekiq in
# development will have the wrong port number on them and the links won't
# work. Go back to .env and friends for the original port so the URL is
# consistent across processes.
"http://localhost:#{Dotenv.parse.fetch('PORT', 3000)}"
"http://localhost:#{ENV.fetch('PORT', 3000)}"
end
end

Expand Down
1 change: 0 additions & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
require "dotenv/rails"

require "./app/lib/hosting_environment"
require "./app/middlewares/redirect_to_service_gov_uk_middleware"
Expand Down

0 comments on commit 3ace7e7

Please sign in to comment.