Is nextjs the modern rails?

Kinda, but not really. There are still lots of parts you'll have to implement yourself if you want to create a CRUD app. The mainly focus on the frontend part with the help from the backend.

Combine next.js with https://blitzjs.com/ and you'll have something that looks like rails.

To throw another in the ring, I recently stumbled on https://github.com/t3-oss/create-t3-app. Lots of buzzword tech in there, but the setup looks very interesting.

Looks like blitz is tRPC + next auth?