The App for Community - https://info.gather.coop
Gather is a Ruby on Rails application with some client-side JavaScript for dynamic view elements. HTML is rendered server-side. SCSS is used for styling.
Development is supported on Linux and macOS. Windows is not supported.
The easiest way to get started is with VS Code and Dev Containers:
- Install Docker and VS Code
- Install the Dev Containers extension
- Clone and open the project:
git clone https://github.com/gather-community/gather.git code gather
- When prompted, click "Reopen in Container" (or run
Dev Containers: Reopen in Containerfrom the command palette) - Once the container is built, run:
mise setup
If not using Dev Containers:
git clone https://github.com/gather-community/gather.git
cd gather
git checkout develop
mise setupThe setup script will guide you through:
- Checking dependencies
- Generating configuration files
- Starting data services (PostgreSQL, Redis, Elasticsearch)
- Provisioning the database with an admin user
- Installing SSL certificates
Once complete, start the application:
bin/dev # Start Rails server with foreman
bin/delayed_job run # Start background job processor (separate terminal)Then visit https://gatherdev.org:3000 and sign in with the credentials shown during setup.
We recommend using mise for managing tool versions and running configuration tasks. The project includes a mise.toml that installs Ruby, Node.js, and other required tools automatically.
| Tool | Purpose |
|---|---|
Ruby (see .ruby-version) |
Application runtime |
Node.js (see .nvmrc) |
JavaScript tooling |
| libvips 8.8+ | Image processing |
| Tool | Purpose |
|---|---|
| Docker | Only required if using the repo's compose.yml for data services |
| Mailcatcher | Email testing (gem install mailcatcher) |
| Mailman 3 | Mailing list integration (see below) |
Run individual setup stages with:
mise deps # Check dependencies
mise conf # Generate configuration
mise data # Setup data services and database
mise ssl # Configure SSL certificatesThe mise data stage will create an admin user for development. If you need to reset the admin password later, run mise data again and select "Reset super admin password".
-
Start data services (PostgreSQL, Redis, Elasticsearch):
docker compose up -d
If you're using your own data services, ensure they're running and configured in
config/database.ymlandconfig/settings.local.yml. Themise datatask will attempt to start Docker Compose services if it can't connect to the configured hosts. -
Run tests to verify everything is working:
bundle exec rspec -
Start the application:
bin/dev # Start Rails server with foreman bin/delayed_job run # Start background job processor (separate terminal)
Job logs go to
log/development.log. Thelog/delayed_job.logfile contains only initialization and job state information.
When using the Rails console, set a tenant first:
CH.tenant(1) # Use Community ID 1Caching is off by default in development. Enable temporarily with:
CACHE=1 rails serverWe use eslint, rubocop, and scss_lint. The CI system enforces these—PRs won't be approved until issues are resolved.
Reset the index:
rails console -e development
Work::Shift.__elasticsearch__.create_index!(force: true)To re-populate after resetting:
ActsAsTenant.current_tenant = Cluster.find(...)
Work::Shift.find_each { |s| s.__elasticsearch__.index_document }Only required if working on mailing list integration:
mkdir ../mailman && cd ../mailman
python3 -m venv venv
source venv/bin/activate
pip3 install mailman postorius hyperkitty whoosh
mailman start
git clone https://github.com/gather-community/mailman-suite.git
cd mailman-suite/mailman-suite_project/
git clone https://github.com/gather-community/discoursessoclient.git
python3 manage.py migrate
python3 manage.py collectstatic
python3 manage.py runserverWhen using Dev Containers, extensions and settings are installed and configured automatically.
If working locally without a Dev Container, install these recommended extensions:
Ruby/Rails:
Shopify.ruby-lsp- Ruby language serverShopify.ruby-extensions-pack- Ruby extensions packKoichiSasada.vscode-rdbg- Ruby debuggerrubocop.vscode-rubocop- RuboCop lintingaliariff.vscode-erb-beautify- ERB formatting
JavaScript/TypeScript:
dbaeumer.vscode-eslint- ESLintesbenp.prettier-vscode- Prettier formattingmarcoroth.stimulus-lsp- Stimulus (Hotwire) supportbradlc.vscode-tailwindcss- Tailwind CSS
Utilities:
hverlin.mise-vscode- mise integrationckolkman.vscode-postgres- PostgreSQL clientms-azuretools.vscode-docker- Docker supportfoxundermoon.shell-format- Shell script formattingtimonwong.shellcheck- Shell script lintingEditorConfig.EditorConfig- EditorConfig support
Recommended settings (.vscode/settings.json):
{
"editor.tabSize": 2,
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[ruby]": {
"editor.defaultFormatter": "Shopify.ruby-lsp"
},
"[erb]": {
"editor.defaultFormatter": "aliariff.vscode-erb-beautify"
},
"[shellscript]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
},
"files.associations": {
"*.html.erb": "erb"
}
}This project is happily tested with BrowserStack!
