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

Uninitialized constant Timeout (NameError) #243

Closed
aeden opened this issue Jul 27, 2015 · 1 comment
Closed

Uninitialized constant Timeout (NameError) #243

aeden opened this issue Jul 27, 2015 · 1 comment
Assignees

Comments

@aeden
Copy link

aeden commented Jul 27, 2015

I am on Ruby 2.1.5.

I did this:

HTTP.
        headers(headers).
        timeout(connect: timeout_in_seconds, read: timeout_in_seconds, write: timeout_in_seconds).
        post(uri(name), body: JSON.dump(request))

And got this stack trace:

http/timeout/per_operation.rb:19:in `connect': uninitialized constant Timeout (NameError)
    from /Users/aeden/.rvm/gems/ruby-2.1.5@integrator/gems/http-0.9.0/lib/http/connection.rb:33:in `initialize'
    from /Users/aeden/.rvm/gems/ruby-2.1.5@integrator/gems/http-0.9.0/lib/http/client.rb:59:in `new'
    from /Users/aeden/.rvm/gems/ruby-2.1.5@integrator/gems/http-0.9.0/lib/http/client.rb:59:in `perform'
    from /Users/aeden/.rvm/gems/ruby-2.1.5@integrator/gems/http-0.9.0/lib/http/client.rb:39:in `request'
    from /Users/aeden/.rvm/gems/ruby-2.1.5@integrator/gems/http-0.9.0/lib/http/chainable.rb:25:in `post'

To workaround the issue I added require 'timeout' to my calling code, but I wanted to report this as others might run into it.

@ixti
Copy link
Member

ixti commented Jul 27, 2015

@aeden Thanks for report.

@ixti ixti closed this as completed in 3556bc7 Aug 25, 2015
@ixti ixti assigned ixti and unassigned zanker Aug 25, 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

3 participants