The new version of the ar-extensions gem requires that you load the appropriate adapter yourself. On my development side I use mysql, however Heroku uses PostgreSQL.
For example, on my development side I need to do this:
require 'ar-extensions/adapters/mysql'
require 'ar-extensions/import/mysql'
How can I audo-detect which adapter to use?
ActiveRecord::Base.configurations[Rails.env]['adapter']will give you the name of the adapter in use.The following code should do what you’re after: