Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Puma error #11

Closed
costajob opened this issue Sep 9, 2016 · 5 comments
Closed

Puma error #11

costajob opened this issue Sep 9, 2016 · 5 comments
Assignees

Comments

@costajob
Copy link

costajob commented Sep 9, 2016

I get this error when running this simple app in Puma 3.5.2 and Rack 1.5.5:

Puma caught this error: uninitialized constant Rack::PATH_INFO
Did you mean?  Pathname (NameError)
/usr/local/lib/ruby/gems/2.3.0/gems/rack-app-5.2.0/lib/rack/app/request_configurator.rb:13:in `path_info'
/usr/local/lib/ruby/gems/2.3.0/gems/rack-app-5.2.0/lib/rack/app/request_configurator.rb:6:in `configure'
/usr/local/lib/ruby/gems/2.3.0/gems/rack-app-5.2.0/lib/rack/app/singleton_methods/rack_interface.rb:6:in `call'
/usr/local/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:138:in `call'
/usr/local/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/urlmap.rb:65:in `block in call'
/usr/local/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/urlmap.rb:50:in `each'
/usr/local/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/urlmap.rb:50:in `call'
/usr/local/lib/ruby/gems/2.3.0/gems/puma-3.5.2/lib/puma/configuration.rb:225:in `call'
/usr/local/lib/ruby/gems/2.3.0/gems/puma-3.5.2/lib/puma/server.rb:569:in `handle_request'
/usr/local/lib/ruby/gems/2.3.0/gems/puma-3.5.2/lib/puma/server.rb:406:in `process_client'
/usr/local/lib/ruby/gems/2.3.0/gems/puma-3.5.2/lib/puma/server.rb:271:in `block in run'
/usr/local/lib/ruby/gems/2.3.0/gems/puma-3.5.2/lib/puma/thread_pool.rb:116:in `block in spawn_thread'

It seems the ::Rack::PATH_INFO constants is not defined in Rack.
Am i missing something?

@costajob
Copy link
Author

costajob commented Sep 9, 2016

Hi! by the way ;)

@adamluzsi
Copy link
Member

Hello @costajob , this is caused because one of the frameworks in the repository lock the rack version on "1.5.5" in your repository, and on that version the Rack project used hard coded strings in env hash lookup instead of freezed strings under constants.

I made a pull request for you, and added backward compatibility for those constants in the project.

Happy coding! :)

@adamluzsi
Copy link
Member

adamluzsi commented Sep 9, 2016

Please verify, that everything is in order and you can play around with your new toy. :)

@adamluzsi adamluzsi self-assigned this Sep 9, 2016
@costajob
Copy link
Author

Hello @adamluzsi, thanks for pointing out, it works like a charm now!
RackApp is also pretty performant in this micro-benchmark, falling within the first three ones ;)
Regards

@adamluzsi
Copy link
Member

thank you @costajob :)
The number one priority for the project is to keep it stable this performance even for larger endpoint numbers. I'm closing this issue than, have a great day! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants