Skip to content

Conversation

@takaokouji
Copy link

Summary

This PR adds Docker support for testing across multiple Rails versions, making it easy to test the gem with different Rails versions in isolated environments.

Features

  • 🐳 Docker Compose configuration with services for Rails 6.1, 7.0, 7.1, 7.2, 8.0, and 8.1.2
  • 📦 Automated dependency management per Rails version
  • 🔄 Shared bundle cache for faster builds
  • 🛠️ Interactive shell mode for debugging
  • 🧹 Optimized .dockerignore for faster builds

Usage

# Test specific Rails version
docker-compose run rails-7.0
docker-compose run rails-8.1

# Interactive shell with specific version
RAILS_VERSION=8.0.4 docker-compose run shell

# Run tests inside container
docker-compose run shell
bundle exec rake test

Docker Services

  • rails-6.1 - Rails 6.1.7.10
  • rails-7.0 - Rails 7.0.10
  • rails-7.1 - Rails 7.1.6
  • rails-7.2 - Rails 7.2.3
  • rails-8.0 - Rails 8.0.4
  • rails-8.1 - Rails 8.1.2
  • shell - Interactive shell (default: Rails 6.1)

Files Added

  • Dockerfile - Container image with Ruby 3.2 and dependencies
  • docker-compose.yml - Service definitions for each Rails version
  • .dockerignore - Optimized build context

Dependencies

This PR depends on #1480 (Rails 7.1+ support) and should be merged after it.

🤖 Generated with Claude Code

- Add Dockerfile with Ruby 3.2 and required dependencies
- Add docker-compose.yml with services for Rails 6.1 and 7.0
- Add .dockerignore to exclude unnecessary files from Docker context
- Update .gitignore to use coverage/ directory and remove duplicate entry

This provides an easy way to test the gem with different Rails versions
in isolated Docker environments.
Fix CI failures with Ruby 2.6 and Rails 6.0/6.1 by adding explicit
require 'logger' to prevent NameError:
  uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger
@takaokouji
Copy link
Author

invalid.

@takaokouji takaokouji closed this Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant