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

Switch to using Rack.release to get Rack's version number #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dgholz
Copy link

@dgholz dgholz commented Jul 1, 2024

Fixes #1

Rack deprecated Rack::VERSION in 3.0.0 and removed it in 3.1.0, and recommend using Rack.release instead.

`Rack::VERSION` has been deprecated, and was removed in Rack `3.1.0`
@jeremiahlukus
Copy link

jeremiahlukus commented Jul 3, 2024

You should probably do something like

rack_version = defined?(Rack::VERSION) ? Rack::VERSION : Rack.release

...

'rack.version' => rack_version

This way its backwards compatible also they are adding version back, so who know if they will remove release later ha

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

Successfully merging this pull request may close these issues.

uninitialized constant Rack::VERSION when used with Rack 3.1.0 or higher
2 participants