Well, Ruby itself has ML libraries like Rumale [1]. But the amount is not as rich as Pythons pypi for obvious reasons.
[1] https://github.com/yoshoku/rumale
Regarding Rails, To be honest, if you want to study Rails. I would suggest you nothing more than their official website. It's really good!