---
title: Ruby Bundler’s cooldown Feature for Safer Gem Updates
url: https://calvin.my/posts/ruby-bundler-s-cooldown-feature-for-safer-gem-updates
published: 2026-06-06
updated: 2026-09-13
category: Development
tags:
- Ruby
- Rails
- bundler
- Gem
summary: Ruby Bundler 4.0.13 introduces a cooldown setting that filters out gem versions published within a chosen number of days. The feature aims to reduce supply-chain risk by allowing time for newly released gems to be vetted and for potential account-takeover incidents to emerge. Developers can apply the setting through dependency configuration or Bundler options, and can override it when immediate updates are necessary.
---

# Ruby Bundler’s cooldown Feature for Safer Gem Updates

**Bundler** is the Ruby tool that installs and manages gem dependencies.

The latest version of Bundler (v 4.0.13) introduces a gem filtering feature called cooldown. When configured, it excludes recently published gem versions for the last N days. The goal is to reduce supply-chain attack risk and add a buffer period in case of incidents such as account takeover attacks.&nbsp; ([Reference](https://blog.rubygems.org/2026/06/03/cooldown-let-new-gems-be-vetted.html))

* * *

## Upgrading to the new version

1\. Run the following:

```bash
% gem update --system
% bundle update --bundler=4.0.13
```

2\. Verify the version

```bash
% bundler version
4.0.13 (2026-06-06 commit 003f20f0dc)
```

* * *

## Configure via Gemfile

1\. Add `cooldown:` days like this in your Gemfile:

```ruby
source "https://rubygems.org", cooldown: 7

gem "rails", "~> 8.1"
```

2\. Run the update command and observe that some newer gem versions are blocked:

```bash
% bundle update

1 version excluded by the cooldown setting; pass `--cooldown 0` to bypass.
```

* * *

## Or, Configure via CLI

1\. Pass the `--cooldown` argument:

```bash
% bundle install --cooldown 7
% bundle update --cooldown 7
% bundle add rails --cooldown 7
% bundle outdated --cooldown 7
```

* * *

## By passing

1\. Set the `--cooldown` to 0 to by pass.

```bash
% bundle install --all --cooldown 0
% bundle update --cooldown 0 brakeman
```
