Firstly, download the latest Ruby Installer for Windows.
Next, install Ruby using the installer. Check the following 2 boxes during the installation:
At the same Ruby Installer download page, download Ruby development kit and install it.
By default, Ruby Installer for Windows includes RubyGems. However, it is not the latest version. Go to RubyGems download page to get the latest RubyGems.
Extract the RubyGem package. Open up Windows command prompt and navigate to the extracted directory. Enter the following command:
To check for gem version, enter the following command in the command prompt:
After that, enter the following command to install Ruby on Rails:
To check for rails version, enter the following command in the command prompt: