We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab556bf commit 32c6d70Copy full SHA for 32c6d70
config/initializers/plaid.rb
@@ -6,10 +6,16 @@
6
7
# Load Plaid configuration from adapters after initialization
8
Rails.application.config.after_initialize do
9
+ # Skip if database is not ready (e.g., during db:create)
10
+ next unless ActiveRecord::Base.connection.table_exists?("settings")
11
+
12
# Ensure provider adapters are loaded
13
Provider::Factory.ensure_adapters_loaded
14
15
# Reload configurations from settings/ENV
16
Provider::PlaidAdapter.reload_configuration # US region
17
Provider::PlaidEuAdapter.reload_configuration # EU region
18
+rescue ActiveRecord::NoDatabaseError, PG::ConnectionBad
19
+ # Database doesn't exist yet, skip initialization
20
+ nil
21
end
0 commit comments