Overview
This quickstart guide will walk you through getting the Gumroad web application running on your local machine. By the end, you’ll have a fully functional local instance accessible athttps://gumroad.dev.
This guide assumes you’re on macOS or Linux. Windows users should use WSL (Windows Subsystem for Linux) and follow these same instructions.
Prerequisites Checklist
Before you begin, ensure you have these installed:- Ruby 3.4.3 (see .ruby-version)
- Node.js 20.17.0 (see .node-version)
- Docker Desktop (macOS) or Docker Engine (Linux)
- MySQL 8.0.x (local installation, not running as a service)
- Image processing libraries (ImageMagick, libvips, FFmpeg)
Don’t have these installed? Check the installation guide for detailed setup instructions.
Step-by-Step Setup
Install Ruby Dependencies
Install Bundler if you don’t have it, then install all Ruby gems:Also install the
dotenv gem which is required for some console commands:Install Node.js Dependencies
Enable corepack for the correct npm version, then install dependencies:This will install all packages defined in package.json, including:
- React 18 and React DOM for the frontend
- TypeScript 5.5 for type safety
- Tailwind CSS 4 for styling
- Webpack and build tools
Configure Environment (Optional)
The app can boot without custom credentials, but if you want to use services like S3, Stripe, or Resend:
You can skip this step for initial setup and add credentials later as needed.
Start Docker Services
Start the required services (MySQL, Redis, Elasticsearch, MongoDB) using Docker:
The
make local command will not terminate - it runs in the foreground. Open a new terminal tab for the next steps, or use LOCAL_DETACHED=true to run in background.Set Up the Database
Create and seed the database with initial data:This command will:
- Create the development and test databases
- Run all migrations
- Load seed data including test users
Index Elasticsearch
Populate Elasticsearch indices to enable search functionality:Then in the Rails console:
Start the Application
Start the Rails server, JavaScript build system, and Sidekiq worker:This single command starts:
- Puma web server on port 3000
- Webpack dev server for hot module reloading
- Sidekiq worker for background jobs
First Login
You can log in with these default credentials:- Email:
[email protected] - Password:
password - Two-factor code:
000000
Additional test users with different roles are available. See the source repository’s docs/users.md file for details.
Verify Your Setup
Confirm everything is working correctly:Common Development Commands
Here are the most frequently used commands:Troubleshooting
Docker Services Not Starting
If Docker services fail to start:- Ensure Docker Desktop is running (macOS/Windows)
- Check port conflicts (3306 for MySQL, 6379 for Redis)
- Try
docker compose downthen restart
Database Connection Errors
If you see MySQL connection errors:- Verify MySQL is installed locally (but not running as a service)
- Check that Docker MySQL container is running:
docker ps - Ensure you have libmysqlclient-dev installed (Linux)
Asset Compilation Errors
If JavaScript assets fail to compile:Elasticsearch Errors
If you seeindex_not_found_exception:
macOS Fork Errors
If you encounter fork() errors when running tests:Next Steps
Now that your environment is set up:Development Guide
Learn about common development workflows and best practices
Contributing
Read the guidelines for submitting pull requests
Testing
Understand the testing strategy and how to write tests
Architecture
Deep dive into the application architecture
Need Help?
If you get stuck:- Check the installation guide for detailed prerequisite setup
- Review Common Issues in the README
- Search existing GitHub issues
- Open a new issue if you’ve found a bug