diff --git a/lib/stagehand.rb b/lib/stagehand.rb
index <HASH>..<HASH> 100644
--- a/lib/stagehand.rb
+++ b/lib/stagehand.rb
@@ -1,8 +1,8 @@
 require "stagehand/schema"
-require "stagehand/engine"
 require "stagehand/staging"
 require "stagehand/production"
 require "stagehand/helpers"
+require "stagehand/engine"
 
 module Stagehand
 end
diff --git a/lib/stagehand/engine.rb b/lib/stagehand/engine.rb
index <HASH>..<HASH> 100644
--- a/lib/stagehand/engine.rb
+++ b/lib/stagehand/engine.rb
@@ -5,5 +5,10 @@ module Stagehand
     config.generators do |g|
       g.test_framework :rspec
     end
+
+    initializer "stagehand.set_connection_names" do
+      Stagehand::Staging::connection_name = Rails.configuration.x.stagehand.staging_connection_name
+      Stagehand::Production::connection_name = Rails.configuration.x.stagehand.production_connection_name
+    end
   end
 end
Set the database connections from Rails env config