Skip to content

Local Development Troubleshooting

This page covers common problems new contributors run into when setting up OnTrack for the first time, along with simple fixes for each one.


Ruby Version Error (doubtfire-api)

OnTrack requires Ruby 3.1.0. If you have a different version, the backend won’t start.

Run these commands to switch to the right version:

Terminal window
rvm install 3.1.0
rvm use 3.1.0
ruby -v

The last command should print ruby 3.1.0. If RVM isn’t installed yet, follow the RVM install guide first.


Database Won’t Load (doubtfire-api)

Don’t run db:migrate on a fresh clone — it will fail. Use this instead:

Terminal window
bundle exec rails db:schema:load

RabbitMQ Error on Startup

If the API fails to connect on startup, you probably need to export these variables. They reset every time you open a new terminal:

Terminal window
export RABBITMQ_USERNAME=guest
export RABBITMQ_PASSWORD=guest

To make this permanent, add them to your ~/.bashrc:

Terminal window
echo 'export RABBITMQ_USERNAME=guest' >> ~/.bashrc
echo 'export RABBITMQ_PASSWORD=guest' >> ~/.bashrc
source ~/.bashrc

Port Already in Use

If a service won’t start because a port is taken, run this to find what’s using it:

Terminal window
lsof -i :3000

Then kill it using the PID number shown:

Terminal window
kill -9 <PID>

Default ports:

ServicePort
doubtfire-api3000
doubtfire-web4200
doubtfire-astro4321
PostgreSQL5432
RabbitMQ5672

Docs Page Not Showing (doubtfire-astro)

Every Markdown file needs this at the very top or it won’t appear on the site:

---
title: Your Page Title
description: A short description.
---

Also make sure the file is inside src/content/docs/.


npm Install Failing (doubtfire-astro)

Try clearing the cache and reinstalling:

Terminal window
npm cache clean --force
npm install

Docker Won’t Start (doubtfire-deploy)

Make sure Docker Desktop is running first. Then check which service is failing:

Terminal window
docker compose logs doubtfire-api
docker compose logs doubtfire-web

Most startup failures are caused by missing RabbitMQ variables — see above.


Still Stuck?

Post in the team channel with the full error message and someone will help you out.