Released Gon v7.0.0

Published: (January 11, 2026 at 01:29 AM EST)
1 min read
Source: Dev.to

Source: Dev.to

Release v7.0.0

Gon v7.0.0 release – this major version bump introduces breaking changes.

Breaking change: request_store is now optional

The dependency on request_store has been removed. Gon now prefers ActiveSupport::CurrentAttributes when it is available.

Background

  • Previously, assigning a value such as gon.foo = 'bar' stored the value internally using request_store.
  • Since Rails 5.2, Rails provides the official alternative ActiveSupport::CurrentAttributes.
  • request_store relies on Thread#[], which actually uses fiber‑local variables. This can cause incorrect behavior when execution switches to another Fiber.
  • Early versions of ActiveSupport::CurrentAttributes also used fiber‑local storage, but starting with Rails 7.0 it automatically switches between fiber‑local and thread‑local storage depending on the server type, making it more stable.

New behavior

ConditionGon’s storage mechanism
Rails 5.2+ and ActiveSupport::CurrentAttributes is availableActiveSupport::CurrentAttributes (automatic)
Otherwiserequest_store (must be added explicitly)

If you need to use request_store with older Rails versions, add it to your Gemfile:

# Gemfile
gem 'request_store'

What to do

  • For most modern Rails applications (Rails 5.2+), no changes are required—Gon will automatically use ActiveSupport::CurrentAttributes.
  • If you encounter any issues or rely on the old behavior, let the maintainers know.
Back to Blog

Related posts

Read more »

ZJIT is now available in Ruby 4.0

Article URL: https://railsatscale.com/2025-12-24-launch-zjit/ Comments URL: https://news.ycombinator.com/item?id=46393906 Points: 21 Comments: 9...