I had a Rails job and slipped back into node, and it's so sad. Node is in a sad state compared to Rails. They don't even know what a framework looks like.
It's the terrible standard library of JS that keeps me with Ruby. Rails makes it even better. Being able to write little things like 3.days.from_now to get a timestamp is great.
I agree that Ruby's standard libs are fantastic, but your example is from ActiveSupport, not the standard Ruby libraries. However, Ruby's well-thought-out object model is what makes libraries like ActiveSupport possible.
I've used Ruby long enough to have some gripes about it, but I've worked in a half-dozen languages as well, and I have yet to meet an object model that I like better. That combined with the standard library, and the affordances for functional data pipelining, are what keeps Ruby among my favorites.
It's even the most basic stuff. For example, as of today, there's no way to have an associative array in JS for which keys are composite types, because key equality is not customizable, and all objects use reference equality by default. For some cases you can stringify the key, but in the most general case (e.g. when you need to key on two object references), the only way to do that is to nest maps, which is slow, verbose, and error-prone.
(Tuples are coming to JS and will solve this particular issue, but it's embarrassing to have to deal with such stuff in 2024. Neither Python nor Ruby ever had this problem.)