A step-by-step guide to upgrading a Rails 6.1 application to Rails 7, covering Ruby 3 migration (including YJIT enablement and keyword argument fixes), Gemfile updates, JavaScript strategy selection (Import Maps vs Webpacker/jsbundling), Hotwire installation (Turbo Drive, Frames, Streams, and Stimulus), ActiveRecord encryption
Table of contents
Before We StartStep 0: Upgrade Ruby First (Required)Step 1: Update the GemfileStep 2: Run the Update TaskStep 3: Choose the JavaScript StrategyStep 4: Install HotwireStep 5: ActiveRecord EncryptionStep 6: Query Method ImprovementsStep 7: Breaking ChangesStep 8: Testing UpdatesStep 9: Performance ImprovementsStep 10: Deployment ConsiderationsUpgrade ChecklistCommon GotchasWhat’s NextResourcesSort: