Skip to content

ombulabs/claude-code_rails-upgrade-skill / rails-upgrade

rails-upgrade

Verified

Analyzes Rails applications and generates comprehensive upgrade reports with breaking changes, deprecations, and step-by-step migration guides for Rails 2.3 through 8.1. Use when upgrading Rails applications, planning multi-hop upgrades, querying version-specific changes, or answering what stands between the app and the next Rails version. Based on FastRuby.io methodology and "The Complete Guide to Upgrade Rails" ebook.

FileKindSize
SKILL.mdskill md11.0 KB
detection-scripts/gem_limits.rbscript6.0 KB
detection-scripts/hop.rbscript2.2 KB
detection-scripts/patterns/rails-40-patterns.expectations.ymlconfig43.8 KB
detection-scripts/patterns/rails-40-patterns.ymlconfig96.5 KB
detection-scripts/patterns/rails-41-patterns.expectations.ymlconfig25.6 KB
detection-scripts/patterns/rails-41-patterns.ymlconfig59.8 KB
detection-scripts/patterns/rails-42-patterns.expectations.ymlconfig27.5 KB
detection-scripts/patterns/rails-42-patterns.ymlconfig48.7 KB
detection-scripts/patterns/rails-50-patterns.expectations.ymlconfig1.9 KB
detection-scripts/patterns/rails-50-patterns.ymlconfig8.1 KB
detection-scripts/patterns/rails-51-patterns.expectations.ymlconfig4.2 KB
detection-scripts/patterns/rails-51-patterns.ymlconfig15.0 KB
detection-scripts/patterns/rails-52-patterns.expectations.ymlconfig5.0 KB
detection-scripts/patterns/rails-52-patterns.ymlconfig14.7 KB
detection-scripts/patterns/rails-60-patterns.expectations.ymlconfig1007 B
detection-scripts/patterns/rails-60-patterns.ymlconfig14.2 KB
detection-scripts/patterns/rails-70-patterns.expectations.ymlconfig4.0 KB
detection-scripts/patterns/rails-70-patterns.ymlconfig11.2 KB
detection-scripts/patterns/rails-71-patterns.expectations.ymlconfig3.1 KB
detection-scripts/patterns/rails-71-patterns.ymlconfig9.5 KB
detection-scripts/patterns/rails-72-patterns.expectations.ymlconfig1.2 KB
detection-scripts/patterns/rails-72-patterns.ymlconfig6.1 KB
detection-scripts/patterns/rails-80-patterns.expectations.ymlconfig6.6 KB
detection-scripts/patterns/rails-80-patterns.ymlconfig21.2 KB
detection-scripts/patterns/rails-81-patterns.expectations.ymlconfig4.3 KB
detection-scripts/patterns/rails-81-patterns.ymlconfig13.2 KB
detection-scripts/scan_patterns.rbscript42.8 KB
examples/multi-hop-upgrade.mdmarkdown18.9 KB
examples/simple-upgrade.mdmarkdown4.0 KB
references/breaking-changes-by-version-reference.mdmarkdown3.9 KB
references/deprecation-warnings-reference.mdmarkdown10.7 KB
references/gem-compatibility-reference.mdmarkdown8.2 KB
references/js-compressor-sprockets-mismatch-reference.mdmarkdown4.7 KB
references/multi-hop-strategy-reference.mdmarkdown8.8 KB
references/next-hop-readiness-reference.mdmarkdown2.1 KB
references/no-test-suite-smoke-reference.mdmarkdown4.7 KB
references/request-patterns-reference.mdmarkdown3.7 KB
references/sequential-strategy-reference.mdmarkdown2.1 KB
references/staying-current-reference.mdmarkdown7.8 KB
references/testing-checklist-reference.mdmarkdown6.3 KB
templates/app-update-preview-template.mdmarkdown4.3 KB
templates/upgrade-report-template.mdmarkdown10.2 KB
version-guides/upgrade-3.2-to-4.0.mdmarkdown68.0 KB
version-guides/upgrade-4.0-to-4.1.mdmarkdown66.7 KB
version-guides/upgrade-4.1-to-4.2.mdmarkdown60.7 KB
version-guides/upgrade-4.2-to-5.0.mdmarkdown9.7 KB
version-guides/upgrade-5.0-to-5.1.mdmarkdown19.1 KB
version-guides/upgrade-5.1-to-5.2.mdmarkdown17.7 KB
version-guides/upgrade-5.2-to-6.0.mdmarkdown6.4 KB
version-guides/upgrade-6.0-to-6.1.mdmarkdown6.8 KB
version-guides/upgrade-6.1-to-7.0.mdmarkdown14.7 KB
version-guides/upgrade-7.0-to-7.1.mdmarkdown13.2 KB
version-guides/upgrade-7.1-to-7.2.mdmarkdown11.2 KB
version-guides/upgrade-7.2-to-8.0.mdmarkdown23.1 KB
version-guides/upgrade-8.0-to-8.1.mdmarkdown14.0 KB
workflows/00-verify-latest-patch-workflow.mdmarkdown1.7 KB
workflows/01-run-test-suite-workflow.mdmarkdown12.7 KB
workflows/02-resolve-deprecation-warnings-workflow.mdmarkdown6.3 KB
workflows/03-validate-upgrade-path-workflow.mdmarkdown1.8 KB
workflows/04-setup-next-rails-workflow.mdmarkdown1.5 KB
workflows/05-detect-breaking-changes-workflow.mdmarkdown20.0 KB
workflows/06-check-gem-compatibility-workflow.mdmarkdown11.1 KB
workflows/07-boot-smoke-test-workflow.mdmarkdown7.3 KB
workflows/08-generate-upgrade-report-workflow.mdmarkdown12.7 KB
workflows/09-generate-app-update-preview-workflow.mdmarkdown7.3 KB
workflows/10-implement-and-upgrade-workflow.mdmarkdown2.5 KB
workflows/11-sync-ci-workflow.mdmarkdown8.6 KB
workflows/12-align-load-defaults-workflow.mdmarkdown952 B
workflows/13-mention-cleanup-workflow.mdmarkdown1.3 KB

templates/app-update-preview-template.md

View on GitHub
# app:update Preview for Rails {TO}

**Current Version:** {FROM}
**Target Version:** {TO}
**Generated:** {DATE}

---

## Overview

Running `rails app:update` will prompt you to update these files.

---

## Files Summary

| Category | Files Changed | Files Added | Files Removed |
|----------|--------------|-------------|---------------|
| Config | {CONFIG_CHANGED} | {CONFIG_ADDED} | {CONFIG_REMOVED} |
| Bin | {BIN_CHANGED} | {BIN_ADDED} | {BIN_REMOVED} |
| Other | {OTHER_CHANGED} | {OTHER_ADDED} | {OTHER_REMOVED} |

---

## Detailed File Changes

### ðŸ”ī HIGH IMPACT (Review Carefully)

<!-- Files that will affect app behavior -->

#### config/application.rb

**Change:** Update load_defaults version

**BEFORE:**
```ruby
config.load_defaults {FROM_SHORT}
```

**AFTER:**
```ruby
config.load_defaults {TO_SHORT}
```

**Impact:** HIGH - Enables new framework defaults. May change behavior.

**Recommendation:** Accept this change, but enable new defaults gradually using `config/initializers/new_framework_defaults_{TO_SLUG}.rb`

---

{HIGH_IMPACT_FILES}

---

### ðŸŸĄ MEDIUM IMPACT (Usually Safe to Accept)

<!-- Files that improve functionality -->

{MEDIUM_IMPACT_FILES}

---

### ðŸŸĒ LOW IMPACT (Safe to Accept)

<!-- Files with minor changes -->

{LOW_IMPACT_FILES}

---

## New Files to Be Created

| File | Purpose | Recommendation |
|------|---------|----------------|
{NEW_FILES_TABLE}

---

## Files You Should NOT Overwrite

These files likely have custom configuration:

| File | Reason |
|------|--------|
{CUSTOM_FILES_TABLE}

---

## Recommended Approach

### Option A: Interactive (Recommended)

```bash
rails app:update
```

For each file, you'll be prompted:
- **Y** - Accept the change
- **n** - Keep your version
- **d** - View the diff
- **q** - Quit

**Follow this decision tree:**

```
Is it a new file?
  → Accept (Y)

Is it config/application.rb load_defaults?
  → Accept (Y)

Is it a file you've customized?
  → View diff (d), then decide

Is it a bin/ script?
  → Usually accept (Y)

Not sure?
  → View diff (d), compare carefully
```

### Option B: Manual (For Complex Apps)

1. Generate a new Rails app with the target version
2. Compare files manually
3. Apply changes selectively

```bash
# Create comparison app
rails new temp_app_compare --skip-bundle
cd temp_app_compare

# Compare specific files
diff -u ../your_app/config/application.rb config/application.rb
```

### Option C: Accept All (Simple Apps Only)

```bash
rails app:update --force
```

⚠ïļ **Warning:** This overwrites all files. Only use if:
- You have version control
- Your config files are standard
- You can review changes afterward

---

## New Framework Defaults

After upgrading, Rails creates:
`config/initializers/new_framework_defaults_{TO_SLUG}.rb`

This file lets you opt-in to new behaviors gradually:

```ruby
# Don't enable all at once!
# Enable one at a time and test:

# Rails.application.config.some_new_default = true
# Rails.application.config.another_default = "value"
```

### Enable Gradually:

1. Uncomment one option
2. Run test suite
3. Test manually
4. Deploy to staging
5. Monitor for issues
6. Repeat for next option

### Once All Verified:

1. Update `config.load_defaults` to {TO_SHORT}
2. Delete the new_framework_defaults file

---

## Diff Reference

### Understanding Diffs

```diff
- This line was removed (old code)
+ This line was added (new code)
  This line is unchanged (context)
```

### Key Things to Look For

1. **Settings that changed default values**
2. **New required settings**
3. **Removed/deprecated settings**
4. **Comments explaining changes**

---

## Post-Update Checklist

After running `rails app:update`:

- [ ] Review all changes in git diff
- [ ] Verify application boots: `rails server`
- [ ] Verify console works: `rails console`
- [ ] Run test suite
- [ ] Check for deprecation warnings
- [ ] Test critical paths manually

---

## Troubleshooting

### "I accidentally overwrote a file"

```bash
git checkout -- path/to/file
```

### "The app won't start after update"

Check the Rails logs:
```bash
tail -f log/development.log
```

Common issues:
- Missing gem versions
- Invalid configuration syntax
- Removed deprecated settings

### "Tests are failing after update"

1. Read the error messages carefully
2. Check for deprecated methods
3. Look for changed default behaviors
4. Consult the Rails upgrade guide

---

**Preview generated by Rails Upgrade Assistant**
planning-and-task-breakdownaddyosmani/agent-skillsBreaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
screenpipethedotmack/claude-memSearch screen and audio history recorded by Screenpipe and optionally save selected context into claude-mem. Use when the user asks to recall desktop activity, a meeting, or something seen in another app through Screenpipe.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
contact-widgetnexu-io/open-designSelf-contained floating chat widget with welcome screen, social links, meeting button, and message input. Single HTML file, zero dependencies.Stars: 108kUpdated Claude CodeCodexVerifiedInstall
meeting-notesnexu-io/open-designMeeting notes page — title bar with attendees, agenda checklist, decisions block, action items table with owners + dates, and a "next meeting" footer. Use when the brief mentions "meeting notes", "minutes", "1:1 notes", "all-hands recap", or "侚čŪŪįšŠč́".Stars: 108kUpdated Claude CodeCodexVerifiedInstall