我正在和Michael Hartl的书Ruby on Rails™ Tutorial: Learn Web Development with Rails, Fourth Edition
一起学习Ruby on Rails。我在尝试toy_app
时收到了错误消息。有谁知道什么是错的?
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'
更新:评论出aise_on_unfiltered_parameters会解决问题。
答案 0 :(得分:0)
我遇到了同样的问题,这就是我解决问题的方法: 转到
config / initializers / new_framework_defaults.rb
并注释或删除以下代码行:
- name: run the write_file.py after it has already been transferred
command: python3.6 /root/ansible_copy/write_file.py > /root/ansible_copy/sink.txt
我希望这会有所帮助