Yes, react-rails 3.2.1 has a known incompatibility with connection_pool ~> 3.0 (default in Bundler/Rails 8+), causing runtime errors during asset compilation/server start due to API changes in ConnectionPool#with block handling.[1]
Root Cause
react-rails internally uses ConnectionPool for asset precompilation (Webpack/ESBuild workers).
connection_pool 3.x changed with signature (fiber/thread safety); react-rails 3.2.1 calls it incorrectly.[2]
Quick Fixes
1. Pin Compatible ConnectionPool (Immediate)
Add to Gemfile:
gem 'connection_pool', '~> 2.4'
bundle update connection_pool
Compatible with react-rails 3.2.1; no code changes. Restart server/assets.[1]
2. Upgrade react-rails (Recommended)
# Gemfile
gem 'react-rails', github: 'reactjs/react-rails' # Latest ~3.3.x
# or wait for 3.3.0 stable
bundle update react-rails
Newer versions fix connection_pool 3.x support. Check changelog.[3]
3. Remove react-rails (Modern Alternative)
Rails 7+ uses jsbundling-rails + shakapacker (esbuild/vite/webpack) for React—no react-rails needed:
# Gemfile
gem 'jsbundling-rails'
gem 'shakapacker' # Webpack for React
# Remove: gem 'react-rails'
rails jsbundling:esbuild # or vite
rails shakapacker:install:webpack
Register components manually via import—cleaner, faster.[3]
Verify Resolution
bundle exec rails s # No connection_pool errors
RAILS_ENV=production bundle exec rails assets:precompile
Pin 2.4 first (safest), upgrade later. Your Devise/STI tests unrelated—this is asset pipeline only.[1]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Yes,
react-rails 3.2.1has a known incompatibility withconnection_pool ~> 3.0(default in Bundler/Rails 8+), causing runtime errors during asset compilation/server start due to API changes inConnectionPool#withblock handling.[1]Root Cause
react-railsinternally usesConnectionPoolfor asset precompilation (Webpack/ESBuild workers).connection_pool 3.xchangedwithsignature (fiber/thread safety);react-rails 3.2.1calls it incorrectly.[2]Quick Fixes
1. Pin Compatible ConnectionPool (Immediate)
Add to
Gemfile:Compatible with
react-rails 3.2.1; no code changes. Restart server/assets.[1]2. Upgrade react-rails (Recommended)
Newer versions fix
connection_pool 3.xsupport. Check changelog.[3]3. Remove react-rails (Modern Alternative)
Rails 7+ uses jsbundling-rails + shakapacker (esbuild/vite/webpack) for React—no
react-railsneeded:Register components manually via
import—cleaner, faster.[3]Verify Resolution
Pin 2.4 first (safest), upgrade later. Your Devise/STI tests unrelated—this is asset pipeline only.[1]
1
2
3
4
5
6
7
8
9
10
11
12
13
14