freelancing-god/combustion — Issue #15: Compatibility with foreigner
Author: KronicDeth
Created: 2012-01-24 15:30:00+00:00
State: open

I'm using foreigner (https://github.com/matthuhiggins/foreigner) to maintain the foreign key constraints in a postgresql database. When Combustion.initialize! is called, it eventually gets down to reading my ActiveRecord models, which triggers the railtie for foreigner. The stack gets to Foreigner::Adapter.configured_name, where it tries to do

ActiveRecord::Base.connection_pool.spec.config[:adapter]

But no connection is established at this time, so it raises a ActiveRecord::ConnectionNotEstablished error.

Is this just an error with my configuration of the spec/internal app or is foreigner just accessing the connection_pool before Combustion expects it?