Reputation: 86
I just upgraded my Rails 6.1.7.7 app to 7.1.3.2. My puma version is 6.4.2. Now when I try to load the app in the browser (http://localhost:3000) I get this message
Puma caught this error: Invalid option key: urlsafe_csrf_tokens= (RuntimeError)
followed by a trace
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/actionpack-7.1.3.2/lib/action_controller/railtie.rb:93:in `block (3 levels) in <class:Railtie>'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/actionpack-7.1.3.2/lib/action_controller/railtie.rb:88:in `each'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/actionpack-7.1.3.2/lib/action_controller/railtie.rb:88:in `block (2 levels) in <class:Railtie>'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/activesupport-7.1.3.2/lib/active_support/lazy_load_hooks.rb:97:in `class_eval'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/activesupport-7.1.3.2/lib/active_support/lazy_load_hooks.rb:97:in `block in execute_hook'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/activesupport-7.1.3.2/lib/active_support/lazy_load_hooks.rb:87:in `with_execution_control'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/activesupport-7.1.3.2/lib/active_support/lazy_load_hooks.rb:92:in `execute_hook'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/activesupport-7.1.3.2/lib/active_support/lazy_load_hooks.rb:78:in `block in run_load_hooks'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/activesupport-7.1.3.2/lib/active_support/lazy_load_hooks.rb:77:in `each'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/activesupport-7.1.3.2/lib/active_support/lazy_load_hooks.rb:77:in `run_load_hooks'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/actionpack-7.1.3.2/lib/action_controller/base.rb:258:in `<class:Base>'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/actionpack-7.1.3.2/lib/action_controller/base.rb:169:in `<module:ActionController>'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/actionpack-7.1.3.2/lib/action_controller/base.rb:7:in `<top (required)>'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/zeitwerk-2.6.13/lib/zeitwerk/kernel.rb:34:in `require'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/zeitwerk-2.6.13/lib/zeitwerk/kernel.rb:34:in `require'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/actionpack-7.1.3.2/lib/action_dispatch/middleware/static.rb:171:in `each_candidate_filepath'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/actionpack-7.1.3.2/lib/action_dispatch/middleware/static.rb:103:in `find_file'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/actionpack-7.1.3.2/lib/action_dispatch/middleware/static.rb:71:in `attempt'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/actionpack-7.1.3.2/lib/action_dispatch/middleware/static.rb:25:in `call'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/rack-2.2.9/lib/rack/sendfile.rb:110:in `call'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/actionpack-7.1.3.2/lib/action_dispatch/middleware/host_authorization.rb:141:in `call'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/railties-7.1.3.2/lib/rails/engine.rb:536:in `call'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/puma-6.4.2/lib/puma/configuration.rb:272:in `call'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/puma-6.4.2/lib/puma/request.rb:100:in `block in handle_request'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/puma-6.4.2/lib/puma/thread_pool.rb:378:in `with_force_shutdown'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/puma-6.4.2/lib/puma/request.rb:99:in `handle_request'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/puma-6.4.2/lib/puma/server.rb:464:in `process_client'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/puma-6.4.2/lib/puma/server.rb:245:in `block in run'
/Users/dsadaka/.rvm/gems/ruby-2.7.1@esebco_marc-r271/gems/puma-6.4.2/lib/puma/thread_pool.rb:155:in `block in spawn_thread'
I have tried setting
config.action_controller.urlsafe_csrf_tokens = false
and
config.action_controller.urlsafe_csrf_tokens = true
and restarting the app without success. I can't find anyone else with this issue anywhere.
Does anyone know what's going on and how to fix this?
thanks, Dan
Upvotes: 0
Views: 212
Reputation: 1570
urlsafe_csrf_tokens
Was remeoved in 7.1 ref. https://github.com/rails/rails/commit/4f12bcd7f1196e0ca60e0ad100356eff91db3978
Upvotes: 0