-
Notifications
You must be signed in to change notification settings - Fork 495
Spring
Michael Grosser edited this page Dec 7, 2019
·
3 revisions
try https://github.com/DocSpring/spring-commands-parallel-tests
DEPRECATED BELOW
Patch spring to reconnect the database and then force-enabled it by running with DISABLE_SPRING=0
# config/spring.rb
require 'spring/application'
class Spring::Application
alias connect_database_orig connect_database
def connect_database
disconnect_database
reconfigure_database
connect_database_orig
end
def reconfigure_database
if active_record_configured?
ActiveRecord::Base.configurations =
Rails.application.config.database_configuration
end
end
end