IMHO, the main reason Rails is declining in relevance isn't microservices or the productivity (!) of Java, but the fact that more and more development effort for web applications is moving into JS front-end coding.
I still love Rails, but when your front end is mostly done using React (or something similar) you lose many of the advantages you previously had when almost your full stack was inside Ruby and Rails.
The latest version moved in the right direction by making Webpack a first-class citizen, but what would really make a big difference would be some kind of native integration of a mature front-end framework. My personal choice would be React, but anything would do as long as the connection between the Ruby API part and the Javascript front-end part followed the DRY and "convention over configuration" principles that made Rails great in the first place.
If I could scaffold CRUD interfaces with basic React components already integrated with the Rails API, and then start developing from there, I would become a much happier programmer :)
I still love Rails, but when your front end is mostly done using React (or something similar) you lose many of the advantages you previously had when almost your full stack was inside Ruby and Rails.
The latest version moved in the right direction by making Webpack a first-class citizen, but what would really make a big difference would be some kind of native integration of a mature front-end framework. My personal choice would be React, but anything would do as long as the connection between the Ruby API part and the Javascript front-end part followed the DRY and "convention over configuration" principles that made Rails great in the first place.
If I could scaffold CRUD interfaces with basic React components already integrated with the Rails API, and then start developing from there, I would become a much happier programmer :)