나는 Ruby on Rails 튜토리얼에 의해 Rails를 배우고 있습니다. Michael Hartl 저 나는 내 레일 프로젝트에 대한 RSpec에 테스트를 실행하려면 다음 명령을 실행해야하는 section 3.2.2 (Test Driven Development)에있어 : ActiveRecord :: Base : Class (NoMethodError)에 대해 정의되지 않은 메소드 'mass_assignment_sanitizer ='
bundle exec rspec spec/
그러나 그것은 작동하지 않습니다. 대신에이 오류가 얻을 :
/Users/mh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/
activerecord-3.1.3/lib/active_record/base.rb:1088:in `method_missing':
undefined method `mass_assignment_sanitizer=' for
ActiveRecord::Base:Class (NoMethodError)
내가 rspec
및 changing my Gemfile를 다시 설치 시도했다, 그러나 아무것도 정의되지 않은 메서드 오류를 진정시킨다 없습니다!
아, 또한'rspec spec /'을 실행하려고하면'command not found' 오류가납니다. –
슬래시없이 시도하십시오. 'rspec spec'. (* just thinking *) –
불행하게도 나는 여전히 슬래시가없는 동일한 오류를 얻는다. –