If people want to know the main reasons why Ruby or by extension RoR, is popular, please check this excellent article by the author of a non-popular programming language Stanza [1].
From the cited article [1]:
"Casual website designers can safely completely ignore the concepts of types and memory deallocation because Ruby is dynamically-typed and garbage-collected. These features are simply not available in all other languages. Java's meta-programming features, for example, are just not powerful enough to implement a system like ActiveRecords. Rails is only possible because of Ruby."
But I'd argue that you can still have types and still have a very powerful meta-programming features and abilities of compiled language for example D to implement a system like ActiveRecords [2].
[1] Stop Designing Languages. Write Libraries Instead:
https://lbstanza.org/purpose_of_programming_languages.html
[2] D Language: Features Overview: