Removing database.yml when using Mongoid in Rails 3.2

后端 未结 2 1275
梦如初夏
梦如初夏 2020-12-09 18:28

I just began a new rails project and wanted to use MongoidDB thru the Mongoid gem. Following the instructions on the Mongoid site, I added the following lines to my G

2条回答
  •  感动是毒
    2020-12-09 19:03

    You're probably setting some config.active_record settings somewhere in your config folder (development.rb, test.rb, etc). You'll want to comment out these settings since you're not using ActiveRecord.

    You can do something like grep -r active_record config/ in your project folder to find files referencing active_record.

    Update: Make sure you have removed the require 'rails/all' line from config/application.rb as well. The new require lines you added are supposed to replace that line. Otherwise, rails/all still loads ActiveRecord.

提交回复
热议问题