Agile Web Development with Rails 6 and later software updated to Rails 7:

Are you using the exact sample code included with the book, or is this your code you are typing as you are following along? If the later, can you post a repo of your app in progress? I can take a look.