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

Ruby 2.2 uninitialized constant HTTP::Timeout::PerOperation::Resolv (NameError) #202

Closed
pxlpnk opened this issue Apr 2, 2015 · 3 comments

Comments

@pxlpnk
Copy link

pxlpnk commented Apr 2, 2015

Using Ruby 2.2.{0,1} and http.rb results in the following error:

/Users/at/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/http-0.8.0/lib/http/timeout/per_operation.rb:4:in `<class:PerOperation>': uninitialized constant HTTP::Timeout::PerOperation::Resolv (NameError)
    from /Users/at/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/http-0.8.0/lib/http/timeout/per_operation.rb:3:in `<module:Timeout>'
    from /Users/at/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/http-0.8.0/lib/http/timeout/per_operation.rb:2:in `<module:HTTP>'
    from /Users/at/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/http-0.8.0/lib/http/timeout/per_operation.rb:1:in `<top (required)>'
    from /Users/at/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
    from /Users/at/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
    from /Users/at/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/http-0.8.0/lib/http.rb:5:in `<top (required)>'
    from /Users/at/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `require'
    from /Users/at/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
    from /Users/at/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in `require'
    from http_bug.rb:2:in `<main>'

This can be reproduced by either using require 'http' in a script or directly in pry/irb.
It does not happen in Ruby 2.1

@ixti
Copy link
Member

ixti commented Apr 2, 2015

Thanks for report!

@ixti
Copy link
Member

ixti commented Apr 2, 2015

As a workaround you can explicitly require "resolv" before require "http". I'm gonna cut a patch release soon though...

@ixti ixti closed this as completed in 2e0f4d3 Apr 2, 2015
@pxlpnk
Copy link
Author

pxlpnk commented Apr 2, 2015

Great. Thank you very much. Great response time (:

Alexey Zapparov notifications@github.com wrote:

As a workaround you can explicitly require "resolv" before require "http". I'm gonna cut a patch release soon though...


Reply to this email directly or view it on GitHub.

zanker pushed a commit to zanker/http.rb that referenced this issue May 8, 2015
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