ractor-rails-shim makes a Rails application Ractor-safe, so it can run in Ractor mode — serving requests from worker Ractors that share one frozen app graph, instead of forking N separate processes. Rails keeps global state (Rails.application, Rails.cache, Rails.logger, and every config value set via mattr_accessor / class_attribute) in class-level instance variables, which Ruby forbids reading or writing from a non-main Ractor. The shim reroutes those accessors through Ractor-safe storage (ActiveSupport::IsolatedExecutionState, or Ractor.store_if_absent) and patches the handful of raw class-ivar accessors Rails reads per-request. It is verified against a real Rails 8.1 app (Devise, Propshaft, Kaminari, PostgreSQL) served by the kino web server in `kino -m ractor` mode. This is a stopgap: once Rails supports Ractor mode upstream, this gem becomes a no-op and can be removed.

Required Ruby Version

>= 4.0

Authors

dev

Versions

  1. 0.2.4 July 16, 2026 (114 KB)
  2. 0.2.2 July 16, 2026 (112 KB)
  3. 0.2.1 July 14, 2026 (111 KB)
  4. 0.2.0 July 14, 2026 (111 KB)

Pushed by

SHA 256 checksum