it was never clear what the niche of Ruby was other than being a modernish scripting language for non-critical web dev. I remember Ruby on Rails becoming trendy for web startups with inexperienced programmers (I was one of them) to prototype things in because Active Record was a simple ORM for its time, outside of that there wasn't much other justification for the stack and since the proliferation of similar easy-to-…
Also, ActiveRecord gained significant capabilities with named scopes, something that isn’t as widely copied.
Finally, Ruby itself lends itself well to writing DSLs, something that Javascript and TypeScript sucks at, but sometimes I still see people try and fail.
To be fair, it is my personal opinion that there has not been anything substantially innovative since Rails 5. The features I have seen since is better done with Elixir/Phoenix, mainly because the BEAM runtime makes better concurrency primitives available.