Zero-Ruby Rails Bootstrapper
Create production-ready Rails applications without installing Ruby on your machine. The only requirement is Docker — everything else is handled automatically inside containers.
RailsForge lets you generate and run Rails applications in a fully containerized environment. No need to install Ruby, Rails, PostgreSQL, or Redis locally. Just fork this template, run the generator, and start coding.
Key benefit: You don't need Ruby installed on your system. Docker handles everything.
- No Ruby installation required — Docker handles everything
- Latest Ruby auto-detected from Docker Hub at project creation
- Docker & Docker Compose for consistent development environment
- PostgreSQL as the default database (with PostGIS support)
- Redis for caching and background jobs
- Interactive project generator with options for:
- Database (PostgreSQL, MySQL, SQLite)
- CSS framework (Tailwind, Bootstrap, Bulma, etc.)
- JavaScript approach (Import maps, ESBuild, Webpack, Bun)
- API-only mode
- Test framework configuration
- Development helper script (
run) for common tasks - Production-ready Dockerfile generated from Rails and optimized with multi-stage builds
- Docker (the only requirement — Ruby is not needed!)
- Docker Compose
-
Fork or clone this repository
-
Run the Rails generator:
./rails-new
-
The script will automatically detect the latest stable Ruby version from Docker Hub and generate your Rails app inside Docker
-
Follow the interactive prompts to configure your new Rails app
-
Navigate to your new app and start developing:
cd your-app-name ./run build # Build Docker images ./run up # Start development server
-
Open your browser: http://localhost:3000
That's it! No Ruby installation needed.
The ./run script provides convenient shortcuts for common tasks:
./run build- Build Docker images./run up- Start all containers./run down- Stop containers./run logs- View container logs./run cli- Enter CLI container
./run rails <command>- Run any Rails command./run console- Start Rails console./run routes- Show routes./run g <generator>- Run generators
./run db:migrate- Run migrations./run db:rollback- Rollback migrations./run db:reset- Reset database./run psql- Connect to PostgreSQL
./run test- Run test suite
./run clean- Remove stopped containers and volumes./run clean:all- Remove everything including images
.
├── rails-new # Interactive Rails project generator
├── run # Development helper script
├── Dockerfile.development # Development Docker image
├── docker-compose.yml # Services configuration
├── .env # Environment variables template
└── .dockerignore # Docker build exclusions
The .env file contains default configuration:
UID/GID- User/group IDs (match host user on Linux)POSTGRES_USER/POSTGRES_PASSWORD- Database credentialsDATABASE_URL- PostgreSQL connection stringREDIS_URL- Redis connection string
When you run ./rails-new, the script will:
- Detect the latest stable Ruby version from Docker Hub automatically
- Update Dockerfiles with the detected Ruby version
- Build the base Docker image
- Generate a new Rails application with your chosen options
- Copy Docker configuration files into the project
- Update all configurations with your app name and Ruby version
- Configure the database to use environment variables
The project automatically detects and uses the latest stable Ruby version available on Docker Hub at the moment of project creation. This means:
- If Ruby 3.5 is released tomorrow, new projects will use it automatically
- No need to manually update version numbers in the template
- The detected version is pinned in the generated Dockerfiles for reproducibility
The Dockerfile.production is automatically generated from Rails' default Dockerfile and optimized for production use:
- Multi-stage build for smaller image size
- Jemalloc for reduced memory usage
- Non-root user for security
- Precompiled assets
- Thruster server by default
Build for production:
docker build -f Dockerfile.production -t your-app .- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is open source and available under the MIT License.