4

升级到 Rails 3.1.10 后,使用 Device 版本 2.2.3,Device Async 抛出以下错误,

/usr/share/ruby-rvm/gems/ruby-1.9.3-p194/gems/devise-async-0.6.0/lib/devise/async.rb:42:in `<top (required)>': undefined method `add_module' for Devise:Module (NoMethodError)
from /usr/share/ruby-rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:240:in `require'
from /usr/share/ruby-rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:240:in `block in require'
from /usr/share/ruby-rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:223:in `block in load_dependency'
from /usr/share/ruby-rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:640:in `new_constants_in'
from /usr/share/ruby-rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:223:in `load_dependency'
from /usr/share/ruby-rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:240:in `require'
from /usr/share/ruby-rvm/gems/ruby-1.9.3-p194/gems/devise-async-0.6.0/lib/devise-async.rb:1:in `<top (required)>'
from /usr/share/ruby-rvm/gems/ruby-1.9.3-p194/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `require'
from /usr/share/ruby-rvm/gems/ruby-1.9.3-p194/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /usr/share/ruby-rvm/gems/ruby-1.9.3-p194/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `each'
from /usr/share/ruby-rvm/gems/ruby-1.9.3-p194/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `block in require'
from /usr/share/ruby-rvm/gems/ruby-1.9.3-p194/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `each'
from /usr/share/ruby-rvm/gems/ruby-1.9.3-p194/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `require'
from /usr/share/ruby-rvm/gems/ruby-1.9.3-p194/gems/bundler-1.2.3/lib/bundler.rb:128:in `require'
from /devel/off/ruby/rails/aodb/config/application.rb:7:in `<top (required)>'
from /usr/share/ruby-rvm/gems/ruby-1.9.3-p194/gems/railties-3.1.10/lib/rails/commands.rb:52:in `require'
from /usr/share/ruby-rvm/gems/ruby-1.9.3-p194/gems/railties-3.1.10/lib/rails/commands.rb:52:in `block in <top (required)>'
from /usr/share/ruby-rvm/gems/ruby-1.9.3-p194/gems/railties-3.1.10/lib/rails/commands.rb:49:in `tap'
from /usr/share/ruby-rvm/gems/ruby-1.9.3-p194/gems/railties-3.1.10/lib/rails/commands.rb:49:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

知道该怎么做吗?

4

1 回答 1

9

将“gem devise-async”移到“gem devise”下方可以解决此问题。

于 2013-02-03T17:47:08.827 回答