Skip to content

Development Setup

vgartg edited this page May 27, 2026 · 1 revision

Development Setup

Prerequisites

  • Ruby 3.3.4 (use rbenv or asdf)
  • PostgreSQL 11+
  • Node.js (LTS) with Yarn
  • foreman gem: gem install foreman

Setup

git clone https://github.com/vgartg/jammer.git
cd jammer
bundle install
yarn install
bundle exec rake db:create
bundle exec rake db:migrate

Running the app

foreman start -f Procfile.dev

This starts three processes together: the Rails server, the CSS build watcher, and the JS build watcher. Open localhost:3000.

If you only need to rebuild assets without the server:

foreman start -f Procfile.front

Environment variables

Copy .env.example to .env and fill in what you need. OAuth credentials (GitHub/Google) are optional for local development - the email/password auth works without them.

Running tests

bundle exec rails test

The test suite uses PostgreSQL. Make sure the test database exists (db:create handles that).

Linting

bundle exec rubocop
bundle exec brakeman -q
bundle exec bundler-audit --update

These are the same checks CI runs. Run them before opening a PR.

Mail

In development, emails are intercepted by letter_opener and open as browser tabs instead of actually sending. No mail server needed.

Background jobs

Sidekiq is not started by Procfile.dev. For local testing of background jobs, run it separately:

bundle exec sidekiq

Or just call job classes inline from rails console.

Tips

  • rails console is your friend for poking at models.
  • The admin panel is at /admin - you need a user with role: admin. In development, set it in console: User.first.update(role: :admin).
  • User subdomains work in development if you add entries to /etc/hosts (e.g., 127.0.0.1 yourname.localhost), but that's optional.

Clone this wiki locally