很奇怪的 database configuration does not specify adapter (由于多定义了多余的ActiveRecord造成的)

发布时间: 2014-08-03 05:22:00

I met this problem due to the 'multiple database support issue'. In my `app/model` folder, there is a file defined a redundant database connection:

class CacheCleanerActiveRecord < ActiveRecord::Base
  establish_connection "cache_cleaner_#{Rails.env}"
  self.abstract_class = true

but this database is not found in my database.yml ( because it's not used at all ).

so the solution is quit simple: remove this file and everything is fine !

refer to: