Rails: Auto-Detecting Database Adapter
Posted
by Dex
on Stack Overflow
See other posts from Stack Overflow
or by Dex
Published on 2010-06-06T09:42:08Z
Indexed on
2010/06/06
15:42 UTC
Read the original article
Hit count: 345
ruby-on-rails
|database
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?
© Stack Overflow or respective owner