This guide walks you from zero to a running agent swarm. No prior Rails or AI experience required.
You need five tools. Most are one-line installs.
macOS (with Homebrew):
brew install rbenv ruby-build
rbenv install 3.4.5
rbenv global 3.4.5Linux (Ubuntu/Debian):
sudo apt-get install -y autoconf bison build-essential libssl-dev libreadline-dev zlib1g-dev libsqlite3-dev
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash
rbenv install 3.4.5
rbenv global 3.4.5Verify: ruby -v should show 3.4.5.
gem install bundlermacOS: Usually pre-installed. Check with sqlite3 --version.
Linux:
sudo apt-get install -y sqlite3 libsqlite3-devFollow the official install guide: Claude Code overview
Verify: claude --version should print a version number.
gem install claude-swarmVerify: claude-swarm --version should print a version number.
git clone https://github.com/CbiPerson/claude-on-rails-demo.git
cd claude-on-rails-demo
bin/quickstartThe bin/quickstart script will:
- Check that all prerequisites are installed
- Run
bundle installto fetch Ruby gems - Run
bin/rails db:prepareto set up the SQLite database - Print next steps
If any check fails, it will tell you exactly what to install.
bin/rails serverOpen your browser to http://localhost:3000. You should see the home page with lesson cards.
Browse around:
- http://localhost:3000/guide -- in-app getting started guide
- http://localhost:3000/examples -- example workflows
- http://localhost:3000/next -- architecture explainer
Open a second terminal (keep the Rails server running in the first one).
cd claude-on-rails-demo
claude-swarmYou'll see the Architect agent start up. It's now waiting for your instructions.
Type this into the swarm:
Add a Contact page with a name field, email field, and a submit button. Include a controller test.
Watch what happens:
- The Architect breaks the task into pieces
- The Controllers agent creates a route and controller
- The Views agent creates the HTML template
- The Tests agent writes a controller test
When it's done, refresh your browser -- the new page should be live at /contact.
Add a Blog with title and body fields. Include a migration, model, controller, and views.
Create a background job that sends a welcome email when a user signs up.
See EXAMPLES.md for detailed walkthroughs of these scenarios.
Ruby isn't installed or isn't on your PATH. If you used rbenv, make sure you added it to your shell profile:
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
source ~/.zshrcThe Claude CLI isn't installed. Follow the install guide.
Install it with gem install claude-swarm. If you get a permissions error, use gem install --user-install claude-swarm.
Make sure you have build tools installed:
- macOS:
xcode-select --install - Linux:
sudo apt-get install build-essential
SQLite3 development headers are missing:
- macOS:
brew install sqlite3 - Linux:
sudo apt-get install libsqlite3-dev
Make sure you're running claude-swarm from the project root directory (where claude-swarm.yml lives).
Another process is using port 3000. Either stop it or run Rails on a different port:
bin/rails server -p 3001