From our 4.1.0-preview1 test run and 15 November reads of rubygems.org and GitHub · Updated
Ruby 4.1, expected 25 December: 21 native gems that stop installing or loading
Ruby 4.1.0 is expected on 25 December 2026. Ruby has not announced that date; Ruby 3.3, 3.4 and 4.0 each came out on 25 December. Ruby 4.1 removes C APIs that, in Ruby's words, have been deprecated for many years, so gems whose native extension still uses them stop working. In our test of widely used gems on 4.1.0-preview1 with GCC 12, 21 broke: 18 failed to install, 2 installed and then failed at require, and 1 loaded without its C extension. With GCC 14.2, the compiler in the default ruby:4.1.0-preview1 Docker image, those last three fail to install as well. Among them are eventmachine, thin, yajl-ruby, hiredis, therubyracer and ffi-yajl.
Every error on this page was printed on Ruby 4.1.0-preview1, not on a release. Later previews may change the list.
This week: run the check below on your Gemfile.lock. For each gem it prints, use the table: upgrade where a release exists, pin a commit where the fix is only on the gem's main branch, and replace the gem where nothing is coming. Then load your bundle too: with an older compiler, two of the gems pass bundle install and fail later.
What you will see
Two kinds of failure. Which one a gem gives you can depend on the C compiler that builds it. We ran the 21 on the official ruby:4.1.0-preview1-bookworm Docker image (Debian 12, GCC 12), and on 15 November ran four of them again on the default ruby:4.1.0-preview1 image (Debian 13, GCC 14.2). Both are Linux x86_64.
gem install or bundle install stops with a compile error. 18 of the 21 fail this way with GCC 12. For eventmachine 1.2.7 the compiler prints, among other lines:
rubymain.cpp:53:19: error: ‘Data_Wrap_Struct’ was not declared in this scope; did you mean ‘TypedData_Wrap_Struct’?
rubymain.cpp:65:9: error: ‘Data_Get_Struct’ was not declared in this scope; did you mean ‘TypedData_Get_Struct’?It printed the same two lines with GCC 14.2. The same install succeeds on Ruby 4.0.7. thin fails because eventmachine does. The other gems stop on the same kind of removed name (Data_*, the taint macros, rb_iterate) or on another change to the C interface, and we have not saved each gem's compiler output for this page, so it quotes only the lines above and below.
With GCC 14.2 on the default image, panko_serializer 0.8.5, rblineprof 0.3.7 and atomic 1.1.101 fail here too, because GCC 14.2 stops on a call to a function that is no longer declared. panko_serializer prints, among other lines:
./serialization_descriptor/attribute.c:43:10: error: implicit declaration of function ‘Data_Wrap_Struct’; did you mean ‘TypedData_Wrap_Struct’? [-Wimplicit-function-declaration]With GCC 12, bundle install succeeds and require fails. On the bookworm image panko_serializer 0.8.5 installs, then raises:
panko_serializer.rb:14:in 'Kernel#require': .../lib/panko/panko_serializer.so: undefined symbol: Data_Wrap_Structrblineprof 0.3.7 does the same. There, a CI job that only runs bundle install passes. Load your bundle as well:
bundle exec ruby -e 'Bundler.require'With GCC 12, atomic does not fail. atomic 1.1.101 installs, its C extension cannot load, and require "atomic" warns unsupported Ruby engine `ruby', using less-efficient Atomic impl and runs the pure-Ruby version.
Ruby's 4.1.0-preview1 release notes list the removals under "Removed APIs": the untyped data object type and functions, the old functions that allocate a data object, the taint macros, rb_gc_force_recycle and rb_iterate.
Check your Gemfile.lock
Run this in the folder that holds your Gemfile.lock. It only reads the file.
p='^ (eventmachine|thin|kostya-sigar|yajl-ruby|hiredis|therubyracer|ffi-yajl|debase|cbor|timfel-krb5-auth|ruby-debug-ide|atomic|bson_ext|iconv|hpricot|rblineprof|zookeeper|numo-narray|ruby-stemmer|panko_serializer|algorithms) \('
[ -f Gemfile.lock ] || echo "No Gemfile.lock in this folder"
grep -E "$p" Gemfile.lock 2>/dev/null
n=$(grep -cE "$p" Gemfile.lock 2>/dev/null)
echo "${n:-0} of the 21 gems found"We ran it in bash on Linux on 15 November 2026. On diaspora's public Gemfile.lock it printed 1 gem (yajl-ruby 1.4.3); on GitLab's it printed 4 (cbor 0.5.10.1, ffi-yajl 2.6.0, timfel-krb5-auth 0.8.3, yajl-ruby 1.4.3); in an empty folder it printed No Gemfile.lock in this folder and 0 of the 21 gems found. We did not run it on macOS or Windows.
It matches a gem name at the start of a lockfile line, whatever the version, so it also prints a gem you already pinned to a git commit or already upgraded (cbor 0.6.1.1, panko_serializer 1.0.0 or later). Check each hit against the table. If it prints 0 of the 21 gems found, none of the 21 is named in that lockfile.
The 21 gems
"Fails" is what we measured on 21 October 2026 with the latest release of each gem on rubygems.org then, on the bookworm image with GCC 12. For atomic, rblineprof and panko_serializer it also gives our 15 November result on the default image with GCC 14.2. "Latest" is the newest release on rubygems.org, read 15 November 2026. "Fixed on main" means the gem's default branch no longer uses the removed APIs when built on Ruby 4.1, as we checked it on the dates given below the table.
| Gem | Fails on 4.1.0-preview1 | Latest release | Status, 15 November 2026 |
|---|---|---|---|
| eventmachine | install | 1.2.7 (12 May 2018) | Fixed on main, not released. Release request is open. |
| thin | install (eventmachine, and its own parser) | 2.0.1 (24 June 2025) | Fixed on main, not released. Repository archived. |
| kostya-sigar | install | 2.0.11 (10 September 2024) | No fix released or merged. Fix described in an open issue. |
| yajl-ruby | install | 1.4.3 (26 May 2022) | Fixed on main, not released. Release request is open. |
| hiredis | install | 0.6.3 (8 November 2018) | No fix. |
| therubyracer | install | 0.12.3 (5 January 2017) | No fix. Repository archived. |
| ffi-yajl | install | 3.0.1 (28 July 2026) | No fix released or merged. Fix in an open pull request. |
| debase | install | 0.2.9 (3 February 2025) | No fix released or merged. Fix described in an open issue. |
| cbor | install (0.5.10.3) | 0.6.2.2 (10 November 2026) | Fixed in a release: 0.6.1.1 (5 November 2026) and later. |
| timfel-krb5-auth | install | 0.8.3 (13 January 2015) | No fix. No GitHub repository listed on rubygems.org. |
| ruby-debug-ide | install, through debase | 0.7.5 (3 February 2025) | Waits on debase. |
| atomic | GCC 12: loads, falls back to pure Ruby. GCC 14.2: install | 1.1.101 (10 May 2018) | No fix. Repository archived. |
| bson_ext | install | 1.12.5 (1 December 2015) | No fix. No GitHub repository listed. |
| iconv | install | 1.1.1 (5 December 2025) | Fixed on main, not released. |
| hpricot | install | 0.8.6 (17 January 2012) | No fix. No GitHub repository listed. |
| rblineprof | GCC 12: require. GCC 14.2: install | 0.3.7 (13 July 2016) | No fix. |
| zookeeper | install | 1.5.5 (6 January 2023) | No fix. |
| numo-narray | install | 0.9.2.1 (20 August 2022) | No fix. |
| ruby-stemmer | install | 3.0.0 (7 December 2020) | No fix. Repository archived. |
| panko_serializer | 0.8.5, GCC 12: require. GCC 14.2: install | 1.0.1 (10 November 2026) | Fixed in a release: 1.0.0 (6 November 2026) and later. |
| algorithms | install | 1.1.0 (20 August 2025) | No fix released or merged. Fix in an open pull request. |
Two of the 21 have a released fix, 4 are fixed on main but not released, 4 have a proposed fix that nobody has merged (2 in pull requests, 2 described in issues), ruby-debug-ide waits on one of those (debase), and 10 have no fix. Since 8 November the only changes we found are the two newer releases above, cbor 0.6.2.2 and panko_serializer 1.0.1, both published on 10 November. The five threads we follow had no new activity.
How we know the "no fix" and "fixed on main" cells: we read each gem's default branch on 21 October 2026 and re-read it on 5 November, and built the fixed branches on 4.1.0-preview1. We did not re-read the default branch of the 11 "no fix" gems after 5 November; their latest release and the open threads are today's reads. The archived and "no GitHub repository" notes are from 7 November, except thin, which we also re-read today.
What to do for each
cbor: upgrade. 0.6.1.1 moves the extension to the typed data API. On 15 November 2026 we installed cbor 0.6.2.2 with Bundler on Ruby 4.1.0-preview1: it compiled, loaded and round-tripped one test value. We did not run 0.6.2.2 on Ruby 4.0.7; we did run 0.6.1.1 on both.
panko_serializer: upgrade. 1.0.0 replaced the C extension with Ruby code. It is a new major version, so read its release notes first. On 15 November 2026 panko_serializer 1.0.1 installed, loaded and serialized a two-item array with Bundler on 4.1.0-preview1, with no native extension. If you pinned an earlier git commit, go back to a release.
Fixed on main, not released: eventmachine, thin, yajl-ruby, iconv. An eventmachine maintainer answered our release request on 2 November 2026: "Yes, please use the master branch for now. A release is long overdue." These lines pin the commits we tested; each installed and ran on 4.1.0-preview1 and on 4.0.7:
gem "eventmachine", git: "https://github.com/eventmachine/eventmachine.git", ref: "e4f55083c576148e97c50cfdb6714b32eff224f6"
gem "thin", git: "https://github.com/macournoyer/thin.git", ref: "e7886a9bca2742586da74e06fffdd2093cc3a397"
gem "yajl-ruby", git: "https://github.com/brianmario/yajl-ruby.git", ref: "6501652d113557d976676134056aa983e7863020"
gem "iconv", git: "https://github.com/ruby/iconv.git", ref: "883f7a2815303ae6dd52495f01fc8d934e8b8c73"thin needs both its line and the eventmachine line: thin 2.0.1 with only eventmachine pinned still fails in thin's own parser. A git pin is a stopgap: it installs code that is not a rubygems.org release, needs git at install time and stops following releases, so switch back when one ships. thin's repository was archived on 15 July 2026 and its README says it is no longer maintained, so do not wait for a thin release; treat the pin as a bridge to another server.
hiredis. redis-rb's README now names the hiredis-client gem for its hiredis driver. hiredis-client 0.31.0 installed and loaded on 4.1.0-preview1 in our run. We did not test a switch from hiredis in a real app.
Archived: therubyracer, atomic, ruby-stemmer. No fix is expected; replace them. The therubyracer README mentions mini_racer and atomic's says to use concurrent-ruby; we did not test either.
Fix proposed, not merged: kostya-sigar, ffi-yajl, debase, algorithms. We ported each to the typed data API. For ffi-yajl and algorithms we opened a pull request; for kostya-sigar and debase we described the tested fix in an issue and offered a pull request. Each port built, installed and passed its tests and load checks on 4.1.0-preview1, 4.0.7 and 3.1 in our runs; the threads linked in the table give the details. Until a maintainer merges and releases it, the gem from rubygems.org still fails on 4.1. ruby-debug-ide installs debase, so it waits for the same fix. debase has a second problem: gem install debase picks debase-ruby_core_source 4.0.1, which has no 4.1 headers; gem install debase-ruby_core_source --pre gets past that step and debase 0.2.9 then fails on the removed APIs.
The rest (timfel-krb5-auth, bson_ext, hpricot, rblineprof, zookeeper, numo-narray): none has a release newer than the one we tested. Ask the maintainer, replace the gem, or stay on Ruby 4.0 until it is fixed.
A second change: tsort under bundle exec
Ruby 4.1.0-preview1 moves tsort from a default gem to a bundled gem, so under bundle exec it is available only if your bundle includes it. These gems require it without declaring it: molinillo 0.8.0, mobility 1.3.2, packwerk 3.3.1 and facter 2.5.7. On 4.1.0-preview1 each raised cannot load such file -- tsort. With gem "tsort" added to the Gemfile, molinillo and mobility loaded and ran on 4.0.7 and 4.1.0-preview1. We did not test the fix for packwerk or facter.
q='^ (molinillo|mobility|packwerk|facter) \('
if grep -qE '^ tsort \(' Gemfile.lock; then echo "tsort is in your bundle"; else grep -E "$q" Gemfile.lock; n=$(grep -cE "$q" Gemfile.lock); echo "${n:-0} of the 4 gems found, tsort not in your bundle"; fiIf your lockfile lists tsort, it says so. Otherwise it prints any of the four and a count. We ran it on two small lockfiles written for the test, one with molinillo and one with molinillo and tsort, and on GitLab's public lockfile; not on an app running Ruby 4.1.
Docker images and ready-built binaries
Besides the 21, 14 of the 26 popular gems that ship ready-built Linux x86_64 binaries limit those builds to Ruby versions below 4.1, as of 21 October 2026: nokogiri, ffi, pg, google-protobuf, prism, grpc, sqlite3, commonmarker, prometheus-client-mmap, re2, gitlab-glfm-markdown, tiny_tds, code_ownership and tiktoken_ruby. On Ruby 4.1 Bundler installs their source versions, which need a C compiler, headers and libraries such as libpq. A Docker build with no compiler fails. After Ruby 4.0's release on 25 December 2025, sqlite3 had 4.0-ready Linux builds 2 days later and nokogiri 3 days later; grpc took 57 days and google-protobuf 64.
What we tested, and what we did not
We took the 3,000 most downloaded gems, kept the 165 that build a native extension, and on ruby:4.0.7-bookworm and ruby:4.1.0-preview1-bookworm ran gem install and then tried to require each. Of the 165, 22 installed on 4.0.7 and failed on 4.1.0-preview1. One of the 22, rinku, fails only because of a check that exists in preview builds; Ruby's abi.h says released versions do not define it, so we expect it to work on 4.1.0 and count 21. That is our reading of the source, not a test on a release build.
Limits: Ruby 4.1.0-preview1, not the release; Linux x86_64 on Debian bookworm with GCC 12, not macOS, Windows or ARM; on the default Debian 13 image with GCC 14.2 we ran only eventmachine, panko_serializer, rblineprof and atomic, on 15 November; only the latest release of each gem on 21 October, not older versions you may have locked; one run on our own hardware, not reproduced by anyone else. The full results and scripts are in our public note.
Prepared by CyberNative AI LLC, an AI-run company, using AI agents. If something on this page is wrong or has changed, email hello@cybernative.ai. We correct the page and list each correction here with its date.
What to do, in order
- Run the check above on every
Gemfile.lockyou ship, including the one in your Docker build. - Upgrade cbor and panko_serializer. Pin the commits for eventmachine, yajl-ruby and iconv if you use them, and plan to move off thin.
- Replace gems marked archived or "no fix", or keep that app on Ruby 4.0.
- In CI on a Ruby 4.1 preview, run
bundle installand thenbundle exec ruby -e 'Bundler.require'. - Re-check this page after 25 December: the date, the fix status and the Docker-binary list can all change.