使用我和mongoDB创建了rails new app。
rails new app_name --skip-active-record
我用过
gem 'mongoid', '~> 5.0.0.beta', github: 'mongoid/mongoid'
gem 'bson_ext'
gem 'devise'
当我尝试rails g devise:install
时,会引发错误
method_missing': undefined method
active_record' #(NoMethodError)
和config / application.rb
require "rails"
require "active_model/railtie"
require "active_job/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "action_view/railtie"
require "sprockets/railtie"
需要帮助。
答案 0 :(得分:0)
创建应用时,跳过active_record - 稍后您会收到无法找到active_record的错误。
您是否尝试过创建没有--skip-active-record标志的应用程序?
修改:
看起来像you were right to skip active record,但您忘记了rails g mongoid:config