🌑

Railsを7から8にアップグレードする

公開日約1年前2025-10-18
更新日約1年前2025-10-19
MarkdownRaw Content

コマンドメモ

Terminal
bundle update
Terminal
bundle clean --force

メモ

  • annotate が Rails 8 で未対応になったので annotaterb に置き換える
  • Active Recordの暗号化問題(下記)
  • gem "debug", platforms: %i[ mri windows ] #, require: "debug/prelude" の require について

ブックマーク

Railsを8.0にアップグレードした際の手順や知見をまとめる GitHub - drwl/annotaterb: A Ruby Gem that adds annotations to your Rails models and route files.
Rails7.1へのアップグレードで発生した暗号化のエラーとその対応 - Studyplus Engineering Blog
config.active_record.encryption.support_sha1_for_non_deterministic_encryption = true

このオプションを有効化すると暗号化でSHA256を使用しつつ復号化はSHA256とSHA1で暗号化された属性の両方を複合化できる状態となります。