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时出现的安装包错误