简体   繁体   English

Puma 发现了这个错误:无效的选项键:raise_on_unfiltered_pa​​rameters

[英]Puma caught this error: Invalid option key: raise_on_unfiltered_parameters

I am learning Ruby on Rails with Michael Hartl's book Ruby on Rails™ Tutorial: Learn Web Development with Rails, Fourth Edition .我正在通过 Michael Hartl 的书Ruby on Rails™ Tutorial: Learn Web Development with Rails, Fourth Edition学习 Ruby on Rails。 I got the error message when trying the toy_app .尝试toy_app时收到错误消息。 Does anyone know what's wrong?有谁知道出了什么问题?

Puma caught this error: Invalid option key: raise_on_unfiltered_parameters= (RuntimeError)
.gem/ruby/gems/actionpack-5.0.0/lib/action_controller/railtie.rb:59:in `block (3 levels) in <class:Railtie>'
.gem/ruby/gems/actionpack-5.0.0/lib/action_controller/railtie.rb:54:in `each'
.gem/ruby/gems/actionpack-5.0.0/lib/action_controller/railtie.rb:54:in `block (2 levels) in <class:Railtie>'
.gem/ruby/gems/activesupport-5.0.0/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
.gem/ruby/gems/activesupport-5.0.0/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
.gem/ruby/gems/activesupport-5.0.0/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
.gem/ruby/gems/activesupport-5.0.0/lib/active_support/lazy_load_hooks.rb:44:in `each'
.gem/ruby/gems/activesupport-5.0.0/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
.gem/ruby/gems/actionpack-5.0.0/lib/action_controller/base.rb:263:in `<class:Base>'
.gem/ruby/gems/actionpack-5.0.0/lib/action_controller/base.rb:164:in `<module:ActionController>'
.gem/ruby/gems/actionpack-5.0.0/lib/action_controller/base.rb:5:in `<top (required)>'
.gem/ruby/gems/actionpack-5.0.0/lib/action_dispatch/middleware/static.rb:77:in `ext'
.gem/ruby/gems/actionpack-5.0.0/lib/action_dispatch/middleware/static.rb:33:in `match?'
.gem/ruby/gems/actionpack-5.0.0/lib/action_dispatch/middleware/static.rb:130:in `call'
.gem/ruby/gems/rack-2.0.5/lib/rack/sendfile.rb:111:in `call'
.gem/ruby/gems/railties-5.0.0/lib/rails/engine.rb:522:in `call'
.gem/ruby/gems/puma-3.4.0/lib/puma/configuration.rb:224:in `call'
.gem/ruby/gems/puma-3.4.0/lib/puma/server.rb:569:in `handle_request'
.gem/ruby/gems/puma-3.4.0/lib/puma/server.rb:406:in `process_client'
.gem/ruby/gems/puma-3.4.0/lib/puma/server.rb:271:in `block in run'
.gem/ruby/gems/puma-3.4.0/lib/puma/thread_pool.rb:114:in `call'
.gem/ruby/gems/puma-3.4.0/lib/puma/thread_pool.rb:114:in `block in spawn_thread'

Update: commenting out raise_on_unfiltered_parameters resolves the issue.更新:注释掉raise_on_unfiltered_parameters解决了这个问题。

I was having this same issue and thi was how i solved it: go to the我遇到了同样的问题,这就是我解决它的方法:转到

config/initializers/new_framework_defaults.rb配置/初始化程序/new_framework_defaults.rb

and comment or delete this line of code:并注释或删除这行代码:

 Rails.application.config.action_controller.raise_on_unfiltered_parameters = true

i hope this helps我希望这有帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从应用程序获取消息:无效的选项键:raise_on_unfiltered_pa​​rameters= (RuntimeError) 在运行生产模式时出错? - Getting Message from application: Invalid option key: raise_on_unfiltered_parameters= (RuntimeError) error while running production mode? Puma捕获了此错误::debug:Symbol的未定义方法“调用” - Puma caught this error: undefined method `call' for :debug:Symbol 在不允许的参数导轨上引发错误 - Raise error on unpermitted parameters rails 动作电缆:Puma捕获了此错误:在5.000秒内无法从池中获得连接 - Actioncable: Puma caught this error: could not obtain a connection from the pool within 5.000 seconds Ruby on Rails Tutorial by Michael - Chapter -2 Toy App - Puma 发现了这个错误:未初始化的常量 ApplicationController (NameError) - Ruby on Rails Tutorial by Michael - Chapter -2 Toy App - Puma caught this error: uninitialized constant ApplicationController (NameError) RSpec错误-“无效选项” - RSpec Error - “Invalid Option” 在Windows上安装Puma错误 - Installing Puma on Windows error 警告—:MONGODB | 不支持的客户端选项“ raise_not_found_error”。 它将被忽略 - WARN — : MONGODB | Unsupported client option 'raise_not_found_error'. It will be ignored RSpec错误:无效选项-警告 - Rspec error: invalid option --warnings Puma安装错误在Windows上 - Puma installation error on windows
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM