dotenv breaking changes
dotenv 3.0.0 (February 12, 2024) is its newest release with breaking changes, 6 of them. The first: dotenv 3.0.0 requires Ruby 3.0 or later. Every breaking API change we have recorded in dotenv on RubyGems: 16 breaking changes in 8 versions. Below, its 8 versions with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version 3.2.0. Source repository
Its 3.0.0 release requires Ruby 3.0 or later. Ruby end of life dates.
- From 2.0.0 to 3.0.0: 6 breaking changes in 1 version.
- From 0.3.0 to 3.0.0: 15 breaking changes in 7 versions.
dotenv 3.0.0 breaking changes
- Removed
Ruby versions before 3.0 are no longer supported. Stay on dotenv 2.x if you must use an older Ruby. github.com - Renamed
dotenv.load
The ActiveSupport::Notifications event dotenv.load is now load.dotenv. Update any subscribers using the old name. github.com - Behavior changed
ENV is now restored automatically in ActiveSupport::TestCase and RSpec tests. Tests that rely on ENV changes persisting between tests will behave differently. github.com - Behavior changed
A literal \n in quoted values is no longer expanded into a newline. Use real line breaks, or set DOTENV_LINEBREAK_MODE=legacy to keep the old behavior. github.com - Behavior changed
Dotenv.Rails.overload
Files now overwrite in the order .env.development.local, .env.local, .env.development, then .env. Check code that depends on the previous precedence. github.com - Configuration changed
Rails versions before 6.1 are no longer supported. Lock dotenv to ~> 2.0 if you use an older Rails. github.com
dotenv 2.0.0 breaking changes
- Removed
Official support for Ruby 1.8.7 and REE ended; they may still work but are untested. Ruby 1.8 users must lock dotenv to version <= 1.1. github.com
dotenv 1.0.0 breaking changes
- Removed
Deprecated features were removed in 1.0.0. Upgrade to 0.11.0 and fix the deprecation warnings before moving to 1.0.0. github.com - Behavior changed
Variable substitutions are no longer applied to values inside single quotes in .env files. github.com - Behavior changed
The .env file is now located using Rails.root instead of the previous lookup. github.com
dotenv 0.11.0 breaking changes
- Removed
The dotenv-deployment functionality was moved out of the dotenv gem into its own dotenv-deployment gem. Code that relied on it must add that gem. github.com
dotenv 0.8.0 breaking changes
- Behavior changed
Text after a # on a variable line is now treated as a comment, so values containing # after a space will be cut short. Quote values that contain #. github.com - Behavior changed
Dotenv.FormatError
When parsing a .env file fails, the library now raises Dotenv::FormatError. Code that loads .env files should rescue this error. github.com
dotenv 0.7.0 breaking changes
- Removed
The deprecated autoloading behavior was removed. Upgrade to 0.6 first and fix any warnings before moving to this version. github.com
Older versions
2 older versions.
Show 2 older versions
dotenv 0.5.0 breaking changes
- Behavior changed
Dotenv now loads .env files as soon as it is required in Rails rather than waiting for Rails initialization. Code that depends on the later load timing may need to be adjusted. github.com
dotenv 0.3.0 breaking changes
- Behavior changed
Values already set in ENV before the app loads are now kept instead of being replaced by values from the .env file. Code that relied on .env values overriding ENV must set them differently. 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.