Home 很奇怪的databaseconfigurationdoesnotspecifyadapter(由于多定义了多余的activerecord造成的)
Post
Cancel

很奇怪的databaseconfigurationdoesnotspecifyadapter(由于多定义了多余的activerecord造成的)

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

This post is licensed under CC BY 4.0 by the author.