This document explains our Ruby version management strategy for the Zer0-Mistakes Jekyll theme, including why we pin specific Ruby versions in Docker and how to handle Ruby upgrades safely.
Ruby 3.4 introduced breaking changes to native extension APIs that affect many gems:
rb_hash_foreach)posix-spawn@0.3.15 fail to compileError: posix-spawn (0.3.15) failed to compile on Ruby 3.4
Cause: github-pages v39 (from 2015) depends on incompatible gems
Result: Docker build failures in test-latest workflow
ruby:slim which resolved to Ruby 3.4# Before: FROM ruby:slim AS base
# After:
FROM ruby:3.3-slim AS base
Benefits:
- name: Update Dependencies to Latest
run: |
docker run --rm -v "$PWD:/site" -w /site ruby:3.3-slim bash -c '
apt-get update -qq && apt-get install -y build-essential git &&
gem install bundler -v "~> 2.3" &&
bundle update --all
'
Benefits:
Our automated dependency update workflow runs weekly to keep gems current while Ruby version stays stable.
bundle update# .github/workflows/ci.yml
matrix:
ruby: ['3.3', '3.4'] # Add new version
# Update to latest compatible versions
bundle update
# Check for warnings
bundle install --verbose
# Only after CI passes with new Ruby version
FROM ruby:3.4-slim AS base
# ...
FROM ruby:3.4-slim AS production
Symptom: make failed, exit code 2 during gem installation
Solution:
# Option A: Update the gem
bundle update <gem-name>
# Option B: Pin Ruby to compatible version
# Dockerfile: FROM ruby:3.3-slim
# Option C: Replace problematic gem
# Check if newer alternatives exist
Symptom: Deprecation warnings or changed behavior
Solution:
# Check gem compatibility
gem list | grep <gem-name>
# Update or pin specific gem version
bundle update <gem-name>
# OR in Gemfile:
gem '<gem-name>', '~> X.Y'
Symptom: Latest dependencies test fails but regular CI passes
Solution:
bundle update --all| Criteria | Upgrade Now | Wait |
|---|---|---|
| Ruby EOL approaching | ✅ | ❌ |
| All gems compatible | ✅ | ❌ |
| Security fixes needed | ✅ | ❌ |
| Breaking changes present | ❌ | ✅ |
| Gem ecosystem unstable | ❌ | ✅ |
| Active project development | ✅ | ❌ |
Last Updated: December 2025
Ruby Version: 3.3
Status: Active