A complete macOS development environment setup optimized for Ruby on Rails development.
git clone https://github.com/ifricker/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
./setup.shThat's it! The script will handle everything automatically.
- Homebrew - Package manager for macOS
- Git - Version control
- Neovim - Modern text editor with custom configuration
- Tmux - Terminal multiplexer
- rbenv - Ruby version manager (preferred over RVM for Rails)
- Latest Ruby - Automatically installs the latest stable version
- Rails - Web application framework
- Bundler - Gem dependency manager
- RuboCop - Ruby linter (integrated with Neovim)
- Solargraph - Ruby language server
- Pry & Pry-Rails - Enhanced Rails console
- nvm - Node version manager
- Node.js LTS - Latest long-term support version
- Yarn - Package manager (Rails 7+ default)
- Prettier - Code formatter (integrated with Neovim)
- ESLint - JavaScript linter
- Zsh - Modern shell
- Oh My Zsh - Zsh framework
- Powerlevel10k - Beautiful and fast prompt theme
- iTerm2 - Enhanced terminal with custom profile
- Useful aliases - Rails and development shortcuts
- PostgreSQL 14 - Primary database for Rails
- Redis - Caching and background jobs
- ImageMagick - Image processing
- Google Chrome - Primary browser
- Visual Studio Code - Backup editor
- Docker - Containerization
- Postman - API testing
- TablePlus - Database GUI
- ripgrep (rg) - Fast code search
- fd - Better find command
- bat - Better cat with syntax highlighting
- exa - Better ls command
- fzf - Fuzzy finder
- htop - Better top command
- jq - JSON processor
- tree - Directory tree viewer
- Restart iTerm2 to apply custom profile settings
- Configure environment variables:
# Edit ~/.env and add your actual information: nvim ~/.env # Example: GIT_USER_NAME="Your Full Name" GIT_USER_EMAIL="your-email@example.com" OPENAI_API_KEY="your-actual-api-key-here"
- Customize your prompt:
p10k configure
- Start services when needed:
brew services start postgresql@14 brew services start redis
~/.dotfiles/
βββ setup.sh # Main installation script
βββ .zshrc # Shell configuration
βββ .env.example # Environment variables template
βββ .gitignore # Git ignore rules
βββ .config/
β βββ nvim/
β βββ init.vim # Neovim configuration
βββ iterm2-profile.plist # iTerm2 settings backup
βββ README.md # This file
# Created during setup:
~/.env # Your actual environment variables (not in git)
You can run specific parts of the setup script:
# Install only Ruby/Rails stack
./setup.sh install_rbenv
# Install only Neovim plugins
./setup.sh install_neovim_plugins
# Setup only iTerm2 profile
./setup.sh setup_iterm_profilecd ~/.dotfiles
git pull
# Re-run setup if needed
./setup.shIf you make changes to your configurations, commit them:
cd ~/.dotfiles
git add .
git commit -m "Update configuration"
git push- No secrets in git - API keys stored in
~/.env(gitignored) - Example template -
.env.exampleshows required variables - Automatic setup - Script copies example to
~/.envfor you to edit
- Backup before changes - Existing configs backed up automatically
- Symlinks not copies - Easy to revert changes
- Gitignore protection - Prevents accidental secret commits
- Rails-optimized plugins: vim-rails, vim-test, vim-rubocop
- Modern enhancements: Telescope (fuzzy finder), Treesitter (syntax highlighting), LSP support
- GitHub Copilot integration
- Smart paste handling - no more indentation issues!
- Consistent code formatting with Prettier integration
- Rails-focused aliases: Quick commands for common Rails tasks
- Development shortcuts: Docker, Git, and testing aliases
- Smart prompt: Shows git status, Ruby version, and more
- Auto-suggestions and helpful tips
- Bracketed paste mode - fixes vim paste indentation automatically
- Optimized for development - proper colors, fonts, and shortcuts
- Consistent experience - same settings across all machines
# Check what failed and re-run
./setup.sh
# If Xcode tools needed, install first:
xcode-select --install
# Then re-run setup.sh# Manually install plugins
nvim
:PlugInstall# Reinitialize rbenv
rbenv init
source ~/.zshrc
# Install Rails again if needed
gem install rails# Restart iTerm2 completely
# Check that iterm2-profile.plist exists in ~/.dotfiles- macOS (tested on Big Sur and newer)
- Internet connection for downloading packages
- Administrator access for some installations
Edit setup.sh and add to the install_homebrew_packages() function:
brew install your-new-packageEdit .config/nvim/init.vim and commit changes:
nvim ~/.dotfiles/.config/nvim/init.vim
# Make your changes
cd ~/.dotfiles
git add .config/nvim/init.vim
git commit -m "Update Neovim configuration"Edit .zshrc for new aliases or environment variables:
nvim ~/.dotfiles/.zshrc
# Make your changes
cd ~/.dotfiles
git add .zshrc
git commit -m "Update shell configuration"After setup, create a new Rails app:
# Create new Rails app with PostgreSQL and React
rails new myapp --database=postgresql --javascript=react
cd myapp
# Start services
brew services start postgresql@14
brew services start redis
# Setup database
rails db:create db:migrate
# Start server
rails server# Rails shortcuts (from .zshrc)
bym # bundle && yarn && rails db:migrate && rails db:create RAILS_ENV=test && spring stop
rspec # bundle exec rspec
skiq # bundle exec sidekiq
# Git shortcuts
gl # git log --pretty=oneline -10
# Docker shortcuts
dc # docker compose
dcps # docker compose psMIT License - feel free to use this configuration for your own development setup.