0
我有一個使用MongoDB的Rails應用程序。爲了連接MongoDB,我使用了mongoid gem,現在我想集成用於驗證的設計。未定義的方法`load_routes!'在rails3中使用設計與mongoid
我使用
gem 'mongoid-devise'
gem 'devise'
bundle install
後,我做的事:
rails g devise:install
但它拋出一個錯誤,象下面這樣:
/home/user/.rvm/gems/[email protected]_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/[email protected]_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/[email protected]_banter_it/gems/mongoid-devise-1.0.1/lib/devise/rails/routes.rb:16:in `<class:RouteSet>'
from /home/user/.rvm/gems/[email protected]_banter_it/gems/mongoid-devise-1.0.1/lib/devise/rails/routes.rb:2:in `<module:Routing>'
from /home/user/.rvm/gems/[email protected]_banter_it/gems/mongoid-devise-1.0.1/lib/devise/rails/routes.rb:1:in `<top (required)>'
from /home/user/.rvm/gems/[email protected]_banter_it/gems/mongoid-devise-1.0.1/lib/devise/rails.rb:1:in `require'
from /home/user/.rvm/gems/[email protected]_banter_it/gems/mongoid-devise-1.0.1/lib/devise/rails.rb:1:in `<top (required)>'
from /home/user/.rvm/gems/[email protected]_banter_it/gems/mongoid-devise-1.0.1/lib/devise.rb:253:in `require'
from /home/user/.rvm/gems/[email protected]_banter_it/gems/mongoid-devise-1.0.1/lib/devise.rb:253:in `<top (required)>'
from /home/user/.rvm/gems/[email protected]/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:in `require'
from /home/user/.rvm/gems/[email protected]/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /home/user/.rvm/gems/[email protected]/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:in `each'
from /home/user/.rvm/gems/[email protected]/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:in `block in require'
from /home/user/.rvm/gems/[email protected]/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in `each'
from /home/user/.rvm/gems/[email protected]/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in `require'
from /home/user/.rvm/gems/[email protected]/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/[email protected]_banter_it/gems/railties-3.2.6/lib/rails/commands.rb:24:in `require'
from /home/user/.rvm/gems/[email protected]_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>'
請幫我找出該怎麼做ASAP ...
有幫助嗎? – abhas 2012-09-11 08:27:03