我有一个使用 MongoDB 的 rails 应用程序。为了与 MongoDB 连接,我使用了 mongoid gem,现在我想集成设计以进行身份验证。
我在用着
gem 'mongoid-devise'
gem 'devise'
在bundle install
我这样做之后:
rails g devise:install
但它会引发如下错误:
/home/user/.rvm/gems/ruby-1.9.3-p194@new_banter_it/gems/activesupport-3.2.6/lib/active_support/core_ext/module/aliasing.rb:31:in `alias_method': undefined method `load_routes!' for class `ActionDispatch::Routing::RouteSet' (NameError)
from /home/user/.rvm/gems/ruby-1.9.3-p194@new_banter_it/gems/activesupport-3.2.6/lib/active_support/core_ext/module/aliasing.rb:31:in `alias_method_chain'
from /home/user/.rvm/gems/ruby-1.9.3-p194@new_banter_it/gems/mongoid-devise-1.0.1/lib/devise/rails/routes.rb:16:in `<class:RouteSet>'
from /home/user/.rvm/gems/ruby-1.9.3-p194@new_banter_it/gems/mongoid-devise-1.0.1/lib/devise/rails/routes.rb:2:in `<module:Routing>'
from /home/user/.rvm/gems/ruby-1.9.3-p194@new_banter_it/gems/mongoid-devise-1.0.1/lib/devise/rails/routes.rb:1:in `<top (required)>'
from /home/user/.rvm/gems/ruby-1.9.3-p194@new_banter_it/gems/mongoid-devise-1.0.1/lib/devise/rails.rb:1:in `require'
from /home/user/.rvm/gems/ruby-1.9.3-p194@new_banter_it/gems/mongoid-devise-1.0.1/lib/devise/rails.rb:1:in `<top (required)>'
from /home/user/.rvm/gems/ruby-1.9.3-p194@new_banter_it/gems/mongoid-devise-1.0.1/lib/devise.rb:253:in `require'
from /home/user/.rvm/gems/ruby-1.9.3-p194@new_banter_it/gems/mongoid-devise-1.0.1/lib/devise.rb:253:in `<top (required)>'
from /home/user/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:in `require'
from /home/user/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /home/user/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:in `each'
from /home/user/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:in `block in require'
from /home/user/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in `each'
from /home/user/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in `require'
from /home/user/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler.rb:119:in `require'
from /home/user/Banter_IT/Project_Concept/config/application.rb:11:in `<top (required)>'
from /home/user/.rvm/gems/ruby-1.9.3-p194@new_banter_it/gems/railties-3.2.6/lib/rails/commands.rb:24:in `require'
from /home/user/.rvm/gems/ruby-1.9.3-p194@new_banter_it/gems/railties-3.2.6/lib/rails/commands.rb:24:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
请帮助我尽快弄清楚该怎么做...