RubySchema

Catch config mistakes in your editor, not in production.

JSON Schemas for the config files in your Ruby project. Your editor flags invalid keys, suggests valid options and shows inline docs as you type. 24 schemas. Tested against real fixtures.

Validation and auto-complete for Kamal’s deploy.yml, from the YAML language server.

Quick start

bin/rails app:template LOCATION=https://www.rubyschema.org/rails.rb

Adds a schema comment to each supported config file in your Rails app. Safe to re-run when new schemas are added. View the template.

Manual setup

YAML

# yaml-language-server: $schema=<url> %YAML 1.1 ---

%YAML 1.1 tells the language server to read the file the way Ruby does, since Psych implements YAML 1.1.

JSON

{ "$schema": "<url>" }

TOML

#:schema <url>

Works with the YAML language server and any JSON Schema-aware editor, including VS Code, Neovim and Zed.

Schemas

Name File Schema
Rails
Database config/database.yml /rails/database.json
Storage config/storage.yml /rails/storage.json
Cable config/cable.yml /rails/cable.json
Cache config/cache.yml /rails/cache.json
Queue config/queue.yml /rails/queue.json
Recurring config/recurring.yml /rails/recurring.json
Deployment & CI
Kamal config/deploy.yml /kamal/deploy.json
Lefthook lefthook.yml
lefthook.json
lefthook.toml
/lefthook.json
Code Quality
Brakeman config/brakeman.yml /brakeman.json
ERB Lint .erb_lint.yml
.erb-lint.yml
/erb_lint.json
RuboCop .rubocop.yml
.rubocop_todo.yml
/rubocop.json
Standard .standard.yml /standard.json
Packwerk package.yml /packwerk/package.json
Background Jobs
Sidekiq config/sidekiq.yml /sidekiq.json
Shoryuken shoryuken.yml /shoryuken.json
Monitoring
Honeybadger config/honeybadger.yml
.honeybadger.yml
/honeybadger.json
RoRvsWild config/rorvswild.yml /rorvswild.json
Scout APM config/scout_apm.yml /scout_apm.json
PgHero config/pghero.yml /pghero.json
I18n
Locale files config/locales/**/*.yml /i18n/locale.json
i18n-tasks config/i18n-tasks.yml /i18n-tasks.json
Other
Blazer config/blazer.yml /blazer.json
Mongoid config/mongoid.yml /mongoid.json
Vite Ruby config/vite.json /vite.json