It doesn't insert the database selector middleware, because the railtie which inserts it has already run by the time the initializer is run. ## Repro [See repo here.](https://github.com/nate-at-gusto/multidb-dont-work) ``` bin/rails test test/integration/replica_test.rb ```