我正在尝试为我的 rails 博客应用程序配置声明式授权。在按要求完成所有操作后,我做了 rails s 来启动服务器。我遇到了以下错误。
rails s
/var/lib/gems/1.8/gems/activerecord-3.2.9/lib/active_record/dynamic_matchers.rb:50:in `method_missing': undefined local variable or method `scopes' for ActiveRecord::Base:Class (NameError)
from /var/lib/gems/1.8/gems/declarative_authorization-0.5.2/lib/declarative_authorization/in_model.rb:37:in `included'
from /var/lib/gems/1.8/gems/declarative_authorization-0.5.2/lib/declarative_authorization/in_model.rb:36:in `module_eval'
from /var/lib/gems/1.8/gems/declarative_authorization-0.5.2/lib/declarative_authorization/in_model.rb:36:in `included'
from /var/lib/gems/1.8/gems/declarative_authorization-0.5.2/lib/declarative_authorization.rb:17:in `include'
from /var/lib/gems/1.8/gems/declarative_authorization-0.5.2/lib/declarative_authorization.rb:17:in `send'
from /var/lib/gems/1.8/gems/declarative_authorization-0.5.2/lib/declarative_authorization.rb:17
from /var/lib/gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `require'
from /var/lib/gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `require'
from /var/lib/gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `each'
from /var/lib/gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `require'
from /var/lib/gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `each'
from /var/lib/gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `require'
from /var/lib/gems/1.8/gems/bundler-1.2.3/lib/bundler.rb:128:in `require'
from /blogging/config/application.rb:7
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/commands.rb:53:in `require'
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/commands.rb:53
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/commands.rb:50:in `tap'
from /var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/commands.rb:50
from script/rails:6:in `require'
from script/rails:6
我的博客应用程序有点类似于这个博客应用程序。
请帮助解决此问题。谢谢。:)-