I also faced the same situation in my windows laptop. What I did was too simple.
Just go on the website (https://hotframeworks.com/railsinstaller-org) and install Ruby on rails for windows.
The installer is downloaded. Now click on the installer and install it.
That's it.