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

timeout: undefined method `to_sym' for :Integer #603

Closed
Deepak275 opened this issue Mar 23, 2020 · 2 comments
Closed

timeout: undefined method `to_sym' for :Integer #603

Deepak275 opened this issue Mar 23, 2020 · 2 comments

Comments

@Deepak275
Copy link

Hi Team,
I am trying to set timeout before the doing the request. I am getting

/Users/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/http-2.2.2/lib/http/chainable.rb:94:in timeout': undefined method to_sym' for 3:Integer (NoMethodError)
Did you mean? to_s

Here is my code snippet:

response = HTTP.headers(params[:header]).timeout(3).get(url, body: params[:body])

Please help me with anything I am missing here

@ixti
Copy link
Member

ixti commented Mar 28, 2020

@Deepak275 Please update your code to run with latest stable http gem version. API of #timeout() was simplified in 4.0.0. For earlier versions you should use full-syntax, see: #446

@tarcieri
Copy link
Member

Let's use #754 to track this class of errors

@tarcieri tarcieri closed this as not planned Won't fix, can't repro, duplicate, stale Dec 13, 2023
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