sinatra breaking changes
sinatra 4.0.0 (January 19, 2024) is its newest release with breaking changes, 6 of them. The first: Drops support for Rack 2 in sinatra 4.0.0. Every breaking API change we have recorded in sinatra on RubyGems: 21 breaking changes in 3 versions. Below, its 3 versions with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version 4.2.2. Source repository
Its 4.0.0 release requires Ruby 2.7.8 or later. Ruby end of life dates.
- From 3.0.0 to 4.0.0: 6 breaking changes in 1 version.
- From 2.0.0 to 4.0.0: 12 breaking changes in 2 versions.
sinatra 4.0.0 breaking changes
- Removed
This release supports only Rack 3, so apps still on Rack 2 must upgrade before using it. github.com - Removed
Sinatra 4.0.0 requires Ruby 2.7.8 or later, so older Ruby versions can no longer be used. github.com - Removed
IndifferentHash
The IndifferentHash initializer is gone, so code that calls it will no longer work. github.com - Removed
Rack.Protection.EncryptedCookie
Rack::Protection::EncryptedCookie is removed; cookies remain encrypted through Rack::Session::Cookie. github.com - Default changed
session_hijacking
The session_hijacking protection is now disabled by default; enable it explicitly if you need it. github.com - Configuration changed
To start the web server through Sinatra you must now install the rackup gem. github.com
sinatra 3.0.0 breaking changes
- Removed
Ruby versions older than 2.6 are no longer supported. Upgrade Ruby before updating Sinatra. github.com - Removed
erubis template engine
Support for the erubis template engine is removed. Templates using it must be moved to a supported engine. github.com - Removed
Reel integration
The Reel integration is removed. Code relying on it must be changed. github.com - Removed
Stylus template engine
Support for the Stylus template engine is removed. Templates using it must be moved to a supported engine. github.com - Removed
textile template engine
Support for the textile template engine is removed. Templates using it must be moved to a supported engine. github.com - Behavior changed
Sinatra.Error
Internal Sinatra errors now inherit from Sinatra::Error, so rescue clauses for Sinatra::Error will catch them. github.com
sinatra 2.0.0 breaking changes
- Behavior changed
The authenticity token length is now a fixed value of 32. github.com - Behavior changed
Rack middleware is now initialized when the server starts rather than when the first request arrives. github.com - Behavior changed
Route patterns are now parsed by Mustermann, which may change how existing route patterns match. github.com - Behavior changed
has_key?
The has_key? method is now indifferent to key type, accepting either String or Symbol. github.com - Behavior changed
not_found
The not_found and error handlers now share 404 behavior, which can change responses for apps that define both. github.com - Behavior changed
params
The params hash now uses a full IndifferentHash implementation, which can change how keys are looked up and stored. github.com - Behavior changed
Rack.Protection.ContentSecurityPolicy
Rack::Protection::ContentSecurityPolicy now emits CSP Level 2 and 3 directives, which can change the headers sent. github.com - Configuration changed
Rack::Test moved to a development dependency, so apps needing it at runtime must add it themselves. github.com - Configuration changed
APP_ENV is now preferred and recommended over RACK_ENV for setting the environment, so apps relying on RACK_ENV should set APP_ENV. github.com
Related packages
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.