Skip to content

Upgrade Ruby on Rails: 7.1 -> 7.2 #1692

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
May 23, 2025
Merged

Upgrade Ruby on Rails: 7.1 -> 7.2 #1692

merged 21 commits into from
May 23, 2025

Conversation

yasulab
Copy link
Member

@yasulab yasulab commented May 23, 2025

関連ページまとめ


事前準備


本 PR で行う作業 (時系列順)

» AI による作業サポートの詳細を見る

Rails を現行の 7.1 から 7.2 にアップグレードしたいので、まずは手順をまとめてくれますか?前回はこんな形で進めました。 #1686

はい、Rails 7.1 から 7.2 へのアップグレード手順をまとめさせていただきます。前回のアップグレードの経験を活かしつつ、以下のように提案させていただきます:

  1. 準備作業

    • 現在のコードベースのバックアップを作成
    • 新しいブランチを作成(例:upgrade-to-rails-7-2
  2. Gemfile の更新

    • rails gem のバージョンを ~> 7.2.0 に更新
    • 関連する gem のバージョンも必要に応じて更新
    • bundle update rails を実行
  3. Rails アップグレードガイドの確認

  4. 設定ファイルの更新

    • bin/rails app:update を実行
    • 生成された設定ファイルを確認し、必要に応じて手動で更新
    • config/application.rbconfig.load_defaults7.2 に更新
  5. テストの実行と修正

    • bundle exec rspec を実行してテストを確認
    • 失敗したテストを修正
    • 特に以下の点に注意:
      • Active Record のクエリ変更
      • ルーティングの変更
      • ビューの変更
  6. 開発環境での動作確認

    • ローカル環境でアプリケーションを起動
    • 主要な機能を手動でテスト
    • エラーログを確認
  7. 本番環境へのデプロイ準備

    • ステージング環境でのテスト
    • パフォーマンスの確認
    • エラーモニタリングの設定確認
  8. 本番環境へのデプロイ

    • メンテナンス時間を設定
    • デプロイを実行
    • デプロイ後の動作確認
  9. 監視とフォローアップ

    • エラーログの監視
    • パフォーマンスの監視
    • 必要に応じて追加の修正

@yasulab yasulab force-pushed the upgrade-to-rails-7-2 branch from 21738df to 4cd82de Compare May 23, 2025 03:46
@yasulab yasulab requested review from nanophate and nalabjp May 23, 2025 04:25
@yasulab
Copy link
Member Author

yasulab commented May 23, 2025

今回はそんなに影響範囲大きくなさそうなので (念のため Rollback の準備はしつつ) 一旦マージしちゃいます!🚀✨

@nalabjp @nanophate マージ後でも全然大丈夫なのでもし何か気になる点などあればコメントいただけると嬉しいです...!! 🙏 💖

@yasulab yasulab merged commit abd35d1 into main May 23, 2025
2 checks passed
@yasulab yasulab deleted the upgrade-to-rails-7-2 branch May 23, 2025 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant