Ruby 4.0 moves ten gems from default to bundled status, meaning they no longer load automatically without a Gemfile entry. The affected gems include benchmark, irb, logger, ostruct, rdoc, win32ole, pstore, fiddle, reline, and others. The change can silently break apps if dependencies that previously pulled these gems in are removed. Key migration steps include auditing your codebase for direct usage and adding explicit Gemfile entries. The post also highlights OpenStruct's performance and safety issues, recommending Ruby 3.2's Data.define as a faster, immutable alternative. Stripping unused bundled gems can reduce Docker image size by up to ~37MB.
Sort: