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

访问量: 1361

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
end

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: http://stackoverflow.com/questions/413659/database-configuration-does-not-specify-adapter/25101896#25101896

订阅/RSS Feed

Subscribe

分类/category