carapace-sh/carapace-bin / skills/rails
rails
VerifiedUse when working with the Rails CLI — commands, generators, database tasks, test subcommands, rake tasks, flags, and argument completion. Triggers on: "rails", "Ruby on Rails", "bin/rails", "rails new", "rails generate", "rails server", "rails console", "rails dbconsole", "rails runner", "rails test", "rails routes", "rails destroy", "rails db", "rails credentials", "rails middleware", "rails notes", "rails dev:cache", "rails restart", "rails secret", "rails stats", "rails about", "rails boot", "rails initializers", "rails plugin", "rails tmp", "rails version", "rails devcontainer", "rails encrypted", "rails zeitwerk", "rails yarn", "rails scaffold", "rails model", "rails migration", "rails controller", "rails resource", "rails job", "rails mailer", "rails channel", "railsrc", ".railsrc", "config/database.yml".
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.5 KB |
| references/cli-commands.md | markdown | 9.6 KB |
| references/configuration.md | markdown | 14.5 KB |
| references/database.md | markdown | 7.0 KB |
| references/environment.md | markdown | 7.7 KB |
| references/generators.md | markdown | 12.4 KB |
| references/rails-new.md | markdown | 4.9 KB |
| references/rake-tasks.md | markdown | 3.8 KB |
| references/testing.md | markdown | 3.5 KB |
references/rake-tasks.md
View on GitHub# Rake Tasks
Miscellaneous Rake tasks accessible via `bin/rails <task>`. These are loaded from `railties/lib/rails/tasks/` and various component-specific task files.
> **Source of truth**: `railties/lib/rails/tasks/`, `activestorage/lib/tasks/`, `actionmailbox/lib/tasks/`, `actiontext/lib/tasks/`.
## Log Tasks
### `log:clear`
Truncate all log files in `log/` to zero bytes.
| Env var | Description |
|---------|-------------|
| `LOGS=test,development` | Only clear specific logs |
## Temp File Tasks
### `tmp:clear`
Clear all temp files (`tmp/cache`, `tmp/sockets`, `tmp/screenshots`).
| Variant | Description |
|---------|-------------|
| `tmp:create` | Create tmp dirs (cache, sockets, pids) |
| `tmp:cache:clear` | Clear `tmp/cache` |
| `tmp:sockets:clear` | Clear `tmp/sockets` |
| `tmp:pids:clear` | Clear `tmp/pids` |
| `tmp:screenshots:clear` | Clear `tmp/screenshots` (Capybara screenshots) |
| `tmp:storage:clear` | Clear `tmp/storage` |
## Time Zone Tasks
### `time:zones:all`
Print all time zones known to Active Support (with UTC offsets and Rails identifiers).
### `time:zones:local`
Print time zones matching the system's local UTC offset.
### `time:zones:us`
Print US time zones.
## Framework Tasks
### `app:template`
Apply a template to the application.
| Env var | Description |
|---------|-------------|
| `LOCATION=/path/to/template` | **Required.** Path or URL to template file |
### `app:templates:copy`
Copy all Rails templates to the application directory for customization.
## Yarn / JavaScript Tasks
### `yarn:install`
Install JavaScript dependencies from `package.json` via Yarn.
### `javascript:install`
Install JavaScript dependencies.
## Zeitwerk
### `zeitwerk:check`
Check the project's file structure for Zeitwerk autoloading compliance. Run in CI.
## Action Mailbox Tasks
### `action_mailbox:ingress:exim`
Relay an inbound email from Exim to Action Mailbox.
| Env var | Description |
|---------|-------------|
| `URL` | **Required.** The ingress URL |
| `INGRESS_PASSWORD` | **Required.** The shared password |
### `action_mailbox:ingress:postfix`
Relay an inbound email from Postfix to Action Mailbox.
| Env var | Description |
|---------|-------------|
| `URL` | **Required.** The ingress URL |
| `INGRESS_PASSWORD` | **Required.** The shared password |
### `action_mailbox:ingress:qmail`
Relay an inbound email from Qmail to Action Mailbox.
| Env var | Description |
|---------|-------------|
| `URL` | **Required.** The ingress URL |
| `INGRESS_PASSWORD` | **Required.** The shared password |
### `action_mailbox:install`
Install Action Mailbox migrations and configuration.
## Action Text Tasks
### `action_text:install`
Copy over the migration, stylesheet, and JavaScript files for Action Text / Trix.
## Active Storage Tasks
### `active_storage:install`
Copy over the migration needed for Active Storage.
### `active_storage:update`
Copy over migrations needed for upgrading Active Storage.
## Engine Migration Tasks
### `railties:install:migrations`
Copy missing migrations from Railties (e.g. engines) into the application's `db/migrate/`.
## Notes on Completion
- **`log:clear`** supports the `LOGS` env var for filtering. Common values: `development`, `test`, `production`.
- **`time:zones:`** subcommands are static: `all`, `local`, `us`. No dynamic list.
- **Action Mailbox ingress tasks** require both `URL` and `INGRESS_PASSWORD` env vars to be set.
- **`app:template`** requires `LOCATION` — can be a file path or URL.
- **`railties:install:migrations`** takes no args/flags. It reads migrations from engine gems.
## Related Skills
- For `rails test` subcommands including `test:db`, see [testing.md](testing.md).
- For `rails db:*` subcommands, see [database.md](database.md).
- For `rails secret`, `version`, `about`, `stats`, `middleware`, etc., see [cli-commands.md](cli-commands.md).
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |