diff --git a/config.ru b/config.ru index 3476455ef..d7295e476 100644 --- a/config.ru +++ b/config.ru @@ -1,5 +1,5 @@ # frozen_string_literal: true # This file is used by Rack-based servers to start the application. -require ::File.expand_path('../config/environment', __FILE__) +require ::File.expand_path('config/environment', __dir__) run Rails.application diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 02827a388..c197bc007 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -1,5 +1,5 @@ ENV['RAILS_ENV'] ||= 'test' -require File.expand_path('../../config/environment', __FILE__) +require File.expand_path('../config/environment', __dir__) abort("The Rails environment is running in production mode!") if Rails.env.production?