1

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.

2
  • 1
    Ruby 2.5.3 is a bit old and probably not supported by the version of Rails you're using. Commented Dec 1, 2023 at 17:52
  • 1
    While version 7.6 of rack-proxy did not include a required ruby version you can see 7.7 shows >= 2.6.0 Source. This happens to align with your issue since Enumerable#then was 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. Commented Dec 1, 2023 at 20:00

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.