I think Ruby itself has lost its trend, but people who use it keep using it.
We are in a time where people prefer compiled, statically typed languages which contributes to Ruby losing its popularity, that's why alternatives like Crystal is growing.
Another reason is Ruby is tightly coupled with the Rails framework, Ruby should really try to separate itself from it and shine on its own.
There is nothing Ruby offers that other languages lacks on, I find it exceptionally well for prototyping and for gluing togheter different things through the CLI etc, and I will continue using Ruby for that.
I believe Ruby will bounce back in the future, we are currently seeing lots of cool new features being introduces after Ruby 3 like YJIT & Ractors!