When I'm starting Rails Server to run my app, I get this error on the browser and terminal,
Yesterday It was working fine but suddenly getting this issue,
Puma caught this error: undefined method `then' for #<Array:0x0000558016a1a018> (NoMethodError)
/home/cis/.rvm/gems/ruby-2.5.3@mind_the_speed/gems/rack-proxy-0.7.6/lib/rack/proxy.rb:27:in `extract_http_request_headers'
/home/cis/.rvm/gems/ruby-2.5.3@mind_the_speed/gems/rack-reverse-proxy-0.12.0/lib/rack_reverse_proxy/roundtrip.rb:256:in `headers'
/home/cis/.rvm/gems/ruby-2.5.3@mind_the_speed/gems/rack-reverse-proxy-0.12.0/lib/rack_reverse_proxy/roundtrip.rb:261:in `block in matches'
/home/cis/.rvm/gems/ruby-2.5.3@mind_the_speed/gems/rack-reverse-proxy-0.12.0/lib/rack_reverse_proxy/roundtrip.rb:260:in `select'
/home/cis/.rvm/gems/ruby-2.5.3@mind_the_speed/gems/rack-reverse-proxy-0.12.0/lib/rack_reverse_proxy/roundtrip.rb:260:in `matches'
/home/cis/.rvm/gems/ruby-2.5.3@mind_the_speed/gems/rack-reverse-proxy-0.12.0/lib/rack_reverse_proxy/roundtrip.rb:246:in `find_rule'
/home/cis/.rvm/gems/ruby-2.5.3@mind_the_speed/gems/rack-reverse-proxy-0.12.0/lib/rack_reverse_proxy/roundtrip.rb:242:in `rule'
/home/cis/.rvm/gems/ruby-2.5.3@mind_the_speed/gems/rack-reverse-proxy-0.12.0/lib/rack_reverse_proxy/roundtrip.rb:19:in `call'
/home/cis/.rvm/gems/ruby-2.5.3@mind_the_speed/gems/rack-reverse-proxy-0.12.0/lib/rack_reverse_proxy/middleware.rb:25:in `call'
/home/cis/.rvm/gems/ruby-2.5.3@mind_the_speed/gems/puma-3.12.6/lib/puma/configuration.rb:227:in `call'
/home/cis/.rvm/gems/ruby-2.5.3@mind_the_speed/gems/puma-3.12.6/lib/puma/server.rb:706:in `handle_request'
/home/cis/.rvm/gems/ruby-2.5.3@mind_the_speed/gems/puma-3.12.6/lib/puma/server.rb:476:in `process_client'
/home/cis/.rvm/gems/ruby-2.5.3@mind_the_speed/gems/puma-3.12.6/lib/puma/server.rb:334:in `block in run'
/home/cis/.rvm/gems/ruby-2.5.3@mind_the_speed/gems/puma-3.12.6/lib/puma/thread_pool.rb:135:in `block in spawn_thread'
I searched for this issue but didn't get the solution.
rack-proxydid not include a required ruby version you can see 7.7 shows>= 2.6.0Source. This happens to align with your issue sinceEnumerable#thenwas introduced in 2.6. Good news here is that 2.5.3 -> 2.6 should not cause any significant issues; however at some point it would be recommended to upgrade to a more modern (i.e. 3.X) ruby version.