This guide provides step-by-step instructions for setting up a local development environment for the IT-Journey repository.
Tool | Minimum Version | Purpose |
---|---|---|
Git | 2.30+ | Version control |
Ruby | 3.2.3 | Jekyll runtime |
Bundler | 2.4+ | Dependency management |
Python | 3.11+ | Automation scripts |
Docker | 20.10+ (optional) | Containerized development |
# Clone the repository
git clone https://github.com/bamr87/it-journey.git
cd it-journey
# Run automated setup
./scripts/core/environment-setup.sh
# Start development server
bundle exec jekyll serve --config _config_dev.yml
# Clone the repository
git clone https://github.com/bamr87/it-journey.git
cd it-journey
# Start with Docker Compose
docker-compose up
# Access at http://localhost:4002
Follow the detailed instructions below for your operating system.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install rbenv and ruby-build
brew install rbenv ruby-build
# Initialize rbenv
echo 'eval "$(rbenv init - zsh)"' >> ~/.zshrc
source ~/.zshrc
# Install Ruby 3.2.3
rbenv install 3.2.3
rbenv global 3.2.3
# Verify installation
ruby --version # Should show 3.2.3
gem install bundler
bundler --version # Should show 2.4+
cd it-journey
bundle install
# Python usually pre-installed on macOS
python3 --version # Should show 3.11+
# If not, install via Homebrew
brew install python@3.11
# Install required packages
pip3 install requests pyyaml
# Download Docker Desktop for Mac
# https://www.docker.com/products/docker-desktop
# Or via Homebrew
brew install --cask docker
sudo apt update
sudo apt upgrade -y
sudo apt install -y \
git \
curl \
build-essential \
libssl-dev \
libreadline-dev \
zlib1g-dev \
autoconf \
bison \
libyaml-dev \
libffi-dev \
libgdbm-dev \
libncurses5-dev
# Clone rbenv
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
# Add to PATH
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source ~/.bashrc
# Install ruby-build
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
# Install Ruby 3.2.3
rbenv install 3.2.3
rbenv global 3.2.3
# Verify
ruby --version
gem install bundler
cd it-journey
bundle install
sudo apt install -y python3.11 python3-pip
pip3 install requests pyyaml
# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# Add user to docker group
sudo usermod -aG docker $USER
# Install Docker Compose
sudo apt install -y docker-compose
# Log out and back in for group changes to take effect
# Run in PowerShell as Administrator
wsl --install
# Restart computer
# Set WSL2 as default
wsl --set-default-version 2
# Install Ubuntu
wsl --install -d Ubuntu-22.04
# Update system
sudo apt update && sudo apt upgrade -y
Continue with the Linux (Ubuntu/Debian) setup instructions above.
# Configure Git line endings
git config --global core.autocrlf input
# Set default editor
git config --global core.editor "code --wait" # If using VS Code
# HTTPS
git clone https://github.com/bamr87/it-journey.git
# SSH (if configured)
git clone git@github.com:bamr87/it-journey.git
cd it-journey
# Ruby gems
bundle install
# Python packages (for scripts)
pip3 install requests pyyaml
# Verify Jekyll
bundle exec jekyll --version
# Copy example environment file (if exists)
cp .env.example .env
# Edit with your settings
nano .env
# Set Jekyll environment
export JEKYLL_ENV=development
# Development server
bundle exec jekyll serve --config _config_dev.yml
# Or use shortcut if configured
make serve # If Makefile exists
# Access at http://localhost:4002
Follow Docker installation instructions for your OS from docker.com.
docker --version
docker-compose --version
# Build image (first time)
docker-compose build
# Start containers
docker-compose up
# Or in detached mode
docker-compose up -d
# View logs
docker-compose logs -f
# Stop containers
docker-compose down
# Rebuild after Gemfile changes
docker-compose build --no-cache
# Access container shell
docker-compose exec jekyll bash
# Run commands in container
docker-compose exec jekyll bundle update
# Clean up
docker-compose down -v # Removes volumes too
File: docker-compose.yml
version: '3.8'
services:
jekyll:
build: .
volumes:
- .:/usr/src/app
- bundle_cache:/usr/local/bundle
ports:
- "4002:4002"
command: bundle exec jekyll serve --host 0.0.0.0 --config _config_dev.yml
volumes:
bundle_cache:
# Open VS Code
code it-journey
# Install recommended extensions (or click when prompted)
# See .vscode/extensions.json
Recommended Extensions:
File: .vscode/settings.json
{
"files.associations": {
"*.html": "liquid"
},
"liquid.format.enable": true,
"markdown.preview.breaks": true,
"[markdown]": {
"editor.wordWrap": "on",
"editor.quickSuggestions": true
}
}
File: .vscode/tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "Serve Jekyll",
"type": "shell",
"command": "bundle exec jekyll serve --config _config_dev.yml",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
}
]
}
# Add to ~/.bashrc or ~/.zshrc
# Jekyll environment
export JEKYLL_ENV=development
# Repository path
export IT_JOURNEY_HOME=~/path/to/it-journey
# Optional: OpenAI for AI features
export OPENAI_API_KEY=your-api-key-here
# Reload shell configuration
source ~/.bashrc # or ~/.zshrc
# Verify
echo $JEKYLL_ENV
echo $IT_JOURNEY_HOME
# Standard
bundle exec jekyll serve --config _config_dev.yml
# With live reload
bundle exec jekyll serve --config _config_dev.yml --livereload
# Incremental builds (faster)
bundle exec jekyll serve --config _config_dev.yml --incremental
# With drafts
bundle exec jekyll serve --config _config_dev.yml --drafts
# Specific port
bundle exec jekyll serve --config _config_dev.yml --port 4003
# Development build
bundle exec jekyll build --config _config_dev.yml
# Production build
JEKYLL_ENV=production bundle exec jekyll build
# Clean build
bundle exec jekyll clean
bundle exec jekyll build
# Update all gems
bundle update
# Update specific gem
bundle update jekyll
# Update GitHub Pages gems
bundle update github-pages
# Check for outdated gems
bundle outdated
# Link checker
python3 scripts/link-checker.py --scope website
# Environment setup
./scripts/core/environment-setup.sh
# Build script
./scripts/development/build/build-site.sh
# Error: Address already in use - bind(2) for 127.0.0.1:4002
# Solution 1: Find and kill process
lsof -i :4002
kill -9 <PID>
# Solution 2: Use different port
bundle exec jekyll serve --config _config_dev.yml --port 4003
# Error: An error occurred while installing ffi
# Solution: Install system dependencies
# macOS
xcode-select --install
# Linux
sudo apt install build-essential libffi-dev
# Then retry
bundle install
# Error: command not found: jekyll
# Solution: Use bundle exec
bundle exec jekyll serve
# Or add to PATH
bundle install --binstubs
export PATH="./bin:$PATH"
# Error: Permission denied
# Solution: Fix permissions
chmod +x scripts/**/*.sh
# Or run with bash
bash scripts/script-name.sh
# Error: Docker build failed
# Solution 1: Clear cache and rebuild
docker-compose down -v
docker-compose build --no-cache
# Solution 2: Check Docker resources
# Increase memory/CPU in Docker Desktop settings
bundle exec jekyll serve --verbose
bundle exec jekyll doctor
After setup is complete:
pages/
directoryscripts/
Last Updated: 2025-10-13
Version: 1.0.0