If the team stays small - rails stays ok.
I've twice now worked for companies that have experienced very dramatic growth. In both of those cases, rails became a huge liability.
Case 1 - I was hire 7, we grew to ~350 engineers in 5 years.
Case 2 - I was hire 50, we grew to ~700 engineers in 5 years.
I'm not saying you can't also mess up that growth without Rails (trust, me - it's very challenging to grow at that speed and retain your sanity) but Rails makes it basically impossible.
And as a counter - if you're small and stay small, basically any tech stack will work just fine, Rails is fine and so are most of the rest.
Essentially - Rails heavily prioritizes single developer productivity at the expense of multi-team productivity.