Yoker
Automated development environment setup for Rails applications
Yoker eliminates the tedious manual configuration of Rails development environments by providing intelligent, automated setup with support for multiple databases, version managers, and containerization options.
✨ Features
- Smart Detection: Automatically detects existing Rails apps, database configs, and version managers
- Multiple Database Support: PostgreSQL, MySQL, and SQLite3
- Version Manager Integration: mise, rbenv, and rvm support
- Containerization Options: Docker Compose, standalone Docker, or native setup
- Interactive & Automated Modes: Guided setup or command-line automation
- Modern Tooling: Built for Rails 7+ with cutting-edge development tools
🚀 Quick Start
# Install the gem
gem install yoker
# Navigate to your Rails app
cd my-rails-app
# Interactive setup (recommended for first-time users)
yoker init --interactive
# Or automated setup with specific options
yoker init \
--database=postgresql \
--version-manager=mise \
--container=docker-compose \
--ruby-version=3.2.0
# Run the generated setup
./bin/setup
📋 Requirements
- Ruby 3.0+
- Rails application (any version)
- Docker (if using containerization)
- mise, rbenv, or rvm (if using version management)
🛠️ Configuration Options
Databases
- PostgreSQL (recommended) - Latest PostgreSQL 18 with Alpine Linux
- MySQL - MySQL 8.0 with optimized configuration
- SQLite3 - For simple development setups
Version Managers
- mise (recommended) - Modern, fast tool version management
- rbenv - Simple Ruby version management
- rvm - Ruby Version Manager
- none - Use system Ruby
Containerization
- docker-compose (recommended) - Full orchestration with services
- docker - Standalone database containers
- none - Native installation
📁 Generated Files
Yoker creates and configures:
your-rails-app/
├── bin/setup # Enhanced setup script
├── config/database.yml # Database configuration
├── docker-compose.yml # Service orchestration
├── Dockerfile # Container definition
├── mise.toml # Tool version management
└── docker/
└── init.sql # Database initialization
🎯 Example Configurations
PostgreSQL + mise + Docker Compose
Perfect for modern Rails development with full containerization:
yoker init \
--database=postgresql \
--version-manager=mise \
--container=docker-compose
Generates:
- PostgreSQL 18 service with persistent data
- mise configuration with Ruby and Node.js
- Docker Compose with health checks
- Enhanced bin/setup with smart detection
MySQL + rbenv + Standalone Docker
Great for teams preferring rbenv with containerized database:
yoker init \
--database=mysql \
--version-manager=rbenv \
--container=docker
SQLite + Native Setup
Minimal setup for simple projects:
yoker init \
--database=sqlite3 \
--container=none
🔧 Advanced Features
Additional Services
When using Docker Compose, you can include additional services:
- Redis - For caching and background jobs
- Sidekiq - Background job processing
- Mailcatcher - Email testing in development
yoker init --interactive
# Select additional services during interactive setup
mise Integration
Yoker generates comprehensive mise configurations:
[tools]
ruby = "3.2.0"
node = "20.0.0"
postgres = "16" # When using native setup
[tasks."dev:setup"]
run = "./bin/setup"
[tasks."dev:server"]
run = "bin/rails server"
[env]
DATABASE_URL = "postgresql://postgres:password@localhost:5432/myapp_development"
Smart Setup Script
The generated bin/setup
script includes:
- ✅ Dependency installation with verification
- ✅ Tool version management integration
- ✅ Database container orchestration
- ✅ Health checks and wait conditions
- ✅ Database preparation and migrations
- ✅ Clear success/error messaging
📊 Status Checking
Check your current development environment:
yoker status
Output:
✅ Rails application detected
Rails version: 7.1.2
✅ Database: postgresql
✅ Version manager: mise
Ruby version: 3.2.0
✅ Docker Compose configuration found
✅ Setup script ready (bin/setup)
🤝 Contributing
We welcome contributions! This gem aims to standardize Rails development environment setup across the community.
Development Setup
git clone https://github.com/ecnal/yoker.git
cd yoker
bundle install
bundle exec rspec
Contributing Guidelines
- Fork the repository
-
Create a feature branch (
git checkout -b feature/amazing-feature
) - Add tests for your changes
-
Ensure tests pass (
bundle exec rspec
) -
Commit your changes (
git commit -m 'Add amazing feature'
) -
Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
🐛 Bug Reports & Feature Requests
Please use GitHub Issues for:
- 🐛 Bug reports with reproduction steps
- 💡 Feature requests with use cases
- 📖 Documentation improvements
- ❓ Questions about usage
📜 License
Yoker is released under the MIT License.
🙏 Acknowledgments
- Rails team for the excellent framework
- mise developers for modern tool management
- Docker team for containerization technology
- The Ruby community for continuous innovation
Made with ❤️ for the Rails community