diff --git a/lib/govuk_app_config.rb b/lib/govuk_app_config.rb
index <HASH>..<HASH> 100644
--- a/lib/govuk_app_config.rb
+++ b/lib/govuk_app_config.rb
@@ -6,9 +6,9 @@ require "govuk_app_config/govuk_i18n"
 # This require is deprecated and should be removed on next major version bump
 # and should be required by applications directly.
 require "govuk_app_config/govuk_unicorn"
-require "govuk_app_config/govuk_prometheus_exporter"
 
 if defined?(Rails)
+  require "govuk_app_config/govuk_prometheus_exporter"
   require "govuk_app_config/govuk_logging"
   require "govuk_app_config/govuk_content_security_policy"
   require "govuk_app_config/railtie"
Use GovukPrometheusExport for only Rails apps

The initialiser modules loads middleware into Rack and explicity depends
on Rails being present.