레일 블로그 앱에 선언적 권한을 설정하려고합니다. 필요한 모든 작업을 마친 후 레일을 사용하여 서버를 시작했습니다. 다음과 같은 오류가 발생했습니다.레일 서버를 실행할 때 오류가 발생했습니다.
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
내 블로그 앱은 blog 앱과 다소 비슷합니다.
이 문제를 해결하는 데 도움을주십시오. 감사. :) -
'method_missing': 정의되지 않은 지역 변수 또는 메소드 'scope'for ActiveRecord :: Base : Class (NameError) 이것은 오류입니다. '스코프'는 어디에 저장/위치합니까? –
당신이 의미하는 바를 설명 할 수 있다면 좋을 것입니다 .. –
당신은이 오류를 읽었나요? –