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

undefined method `timeout=' for Rack::Timeout:Class (NoMethodError) for 0.5.0.1 #130

Closed
thebravoman opened this issue May 23, 2018 · 4 comments

Comments

@thebravoman
Copy link

Updating from

  • rack-timeout (0.4.2)
  • rack-timeout (0.5.0.1)

There is an error at

# config/initializers/timeout.rb
Rack::Timeout.timeout = 30  # seconds

The error is

config/initializers/timeout.rb:2:in `<top (required)>': undefined method `timeout=' for Rack::Timeout:Class (NoMethodError)

Looked at the change log, but this breaking change was not mentioned? Is this expected as a breaking change between these two versions.

@wuputah
Copy link
Collaborator

wuputah commented May 23, 2018

Yes, this is one of the legacy class setters that was removed in this release.

@thebravoman
Copy link
Author

What are we suppose to use instead? @wuputah

@thebravoman
Copy link
Author

I suppose this -

Rails.application.config.middleware.insert_before Rack::Runtime, Rack::Timeout, service_timeout: 5

It should have the same effect right?

@wuputah
Copy link
Collaborator

wuputah commented May 24, 2018

Yes, that works. Alternatively, you can use the environment variables (from #105).

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