ptsadmin @ ptsadmin-desktop:〜/ swaptan/26March/my_store $ rails g spree_news:install /home/ptsadmin/.rvm/gems/ruby- 1.9.3-preview1 /寶石/了activerecord-3.1.1/LIB/active_record/base.rb:1088:在method_missing': undefined method
mass_assignment_sanitizer =」 ActiveRecord的::基地:類(NoMethodError)安裝狂歡時出現錯誤? undefined method'mass_assignment_sanitizer ='for ActiveRecord :: Base:Class(NoMethodError)
2
A
回答
2
編輯Development.rb 和註釋這些2行
config.active_record.mass_assignment_sanitizer =:嚴格 config.active_record.auto_explain_threshold_in_seconds = 0.5
0
確保您使用的是正確版本的active_record
寶石,大概3.2.12,查看this question瞭解更多信息。
相關問題
- 1. 未定義的方法`mass_assignment_sanitizer ='爲ActiveRecord :: Base:Class(NoMethodError)
- 2. 重新安裝論壇時出現「8:Undefined offset:1」錯誤
- 3. 安裝指令時出現Angular2錯誤
- 4. 安裝pytorch時出現HTTP錯誤
- 5. GoLang:在安裝時出現此錯誤
- 6. 嘗試安裝PIL時出現錯誤
- 7. 使用self.calculate時出現undefined錯誤
- 8. 試圖安裝jekyll時出現錯誤
- 9. pip3安裝時出現SSL錯誤
- 10. 爲python3安裝Pandas for MacOSX時出現的錯誤
- 11. 安裝PyCrypto時出現「Stopped working」錯誤
- 12. 嘗試安裝python時出現錯誤
- 13. dynamic_matchers.rb:55:在`method_missing':未定義的方法`migration_error ='爲ActiveRecord :: Base:Class(NoMethodError)
- 14. 在to_xml中包含ActiveRecord錯誤時拋出NoMethodError
- 15. ActiveRecord - NoMethodError
- 16. 安裝RVM:出錯「出現錯誤(23)。」
- 17. 安裝寶石時出現RVM錯誤
- 18. 使用pip安裝時出現錯誤
- 19. 安裝導軌時出錯
- 20. 安裝nativescript時出現npm錯誤
- 21. 安裝Tomcat時出現錯誤信息
- 22. 安裝模塊時出現錯誤drupal6.2
- 23. 安裝bazel時出現語法錯誤
- 24. 安裝離子時出現錯誤2
- 25. 安裝Vim時出現錯誤插件
- 26. 安裝時出現Android錯誤:[INSTALL_FAILED_MISSING_SHARED_LIBRARY]
- 27. 安裝時出現gradle build錯誤
- 28. NoMethodError,undefined方法
- 29. 安裝giter8時出現錯誤,同時安裝giter8
- 30. 安裝bcrypt-ruby gem時出現的安裝包錯誤