Rails took off in 2004 as a rebellion against the overly-heavy Java frameworks like Struts. But now what good ideas Rails offered have been incorporated into languages that run on the JVM, and a lot of innovation, in particular with concurrency, is happening on the JVM, and some of those things are areas where Ruby (other than JRuby) is weak.
ORM? Hibernate or JPA2 can be run anywhere: inside or outside container (i.e.: desktop app, web-app, or simply daemon/service)
DI? Spring or CDI
Unit-test? JUnit or TestNG or others
Mocking? EasyMock, Mockito
Message Queue? Pick one out there
Templating? JSP, JSF(ish), Velocity, FreeMarker.
RESTful? Restlet, Jersey
Everybody plays well with one and the other.