Installing Ruby and Gems on Windows
This guide will help you install Ruby, Bundler, and the required gems to run the documentation locally.
🪟 Windows Installation
Option 1: RubyInstaller (Recommended)
- Download RubyInstaller:
- Visit https://rubyinstaller.org/downloads/
- Download the latest Ruby+Devkit version (e.g., Ruby+Devkit 3.2.X)
- Choose the x64 version for 64-bit Windows
- Install Ruby:
- Run the downloaded installer
- Check “Add Ruby executables to your PATH”
- Check “Associate .rb and .rbw files with this Ruby installation”
- Install with default settings
- Install MSYS2 Development Toolchain:
- After Ruby installation, a command prompt will open
- When prompted, press
Enter
to install MSYS2 and development toolchain - This is required for native gem compilation
Option 2: Using Chocolatey
If you have Chocolatey package manager:
choco install ruby
Option 3: Using winget
If you have Windows Package Manager:
winget install RubyInstallerTeam.Ruby
🔧 Verify Installation
Open a new Command Prompt or PowerShell and run:
ruby --version
gem --version
You should see version numbers for both commands.
📦 Install Bundler
Install the Bundler gem globally:
gem install bundler
🚀 Install Project Dependencies
- Navigate to your project directory:
cd d:\Github\react-app-folder-structure
- Install all gems from Gemfile:
bundle install
This will install:
github-pages
- For GitHub Pages compatibilityjust-the-docs
- The documentation themewdm
- Windows directory monitoring (for auto-reload)- Other dependencies
🏃♂️ Run the Documentation Site
After installation, start the Jekyll server:
bundle exec jekyll serve
The site will be available at: http://localhost:4000
🔧 Troubleshooting
Common Issues:
1. SSL Certificate Errors:
gem update --system
2. Permission Errors: Run Command Prompt as Administrator and retry.
3. Native Extension Build Errors: Make sure you installed Ruby+Devkit and the MSYS2 toolchain.
4. Bundle Install Fails: Try updating RubyGems:
gem update --system
gem cleanup
bundle install
5. Jekyll Command Not Found:
gem install jekyll
# Then try again
bundle exec jekyll serve
Alternative: Using Docker
If you encounter persistent issues, you can use Docker:
# Build and run with Docker
docker run --rm -v "%cd%":/usr/src/app -p 4000:4000 jekyll/jekyll:latest jekyll serve --host 0.0.0.0
📝 Development Workflow
- Make changes to documentation files
- Jekyll auto-reloads (thanks to
wdm
gem on Windows) - View changes at
http://localhost:4000
- Commit and push when satisfied
🆘 Need Help?
🎯 Quick Commands Reference
# Check versions
ruby --version
gem --version
bundler --version
# Install dependencies
bundle install
# Update gems
bundle update
# Start development server
bundle exec jekyll serve
# Build static site
bundle exec jekyll build
# Clean build files
bundle exec jekyll clean