If you build on NextJS you will get the entire tailwinds of the industry behind you. Having Cursor write a full-stack app that leverages server components alongside client components is a 10x velocity unlock that you won't get if you bifurcate your codebase (as is the rails model)
Typescript is going to be the language of AI engineering, (with Python being the language of ML engineering).
Rails is a fundamentally unserious framework:
1. It lacks LSP (any modern language should support this, think "clicking" a function call to go to it's definition)
2. it lacks type-safety (do you really want to write unit tests to enforce contracts and expectations in your code? or just use the type system?)
3. Object-Oriented-Programming is a failed paradigm for modern web development
4. elite engineers will not want to work for you