Ruby Installation - Windows
The steps to install Ruby on a Windows machine are listed below.
Download address:
- Official website:http://rubyinstaller.org/downloads/
- Domestic:https://rubyinstaller.cn/
Note:When installing, you may have different available versions.
- On Windows, we can use RubyInstaller to install the Ruby environment. The download address is:Please click here to download。
- After downloading rubyinstaller, extract it to a newly created directory:
- Double-click the rubyinstaller-2.2.3.exe file to launch the Ruby installation wizard.
- Click Next to continue the wizard, and remember to checkAdd Ruby executables to your PATH, until the Ruby installer completes the Ruby installation.
If your installation did not properly configure the environment variables, you may need to configure the environment variables next.
- If you are using Windows 9x, then add the following to your c:\autoexec.bat: set PATH="D:\(ruby InstallationDirectory)\bin;%PATH%"
- Windows NT/2000 users need to modify the registry.
- Click Control Panel | System Performance | Environment Variables.
- Under System Variables, select Path, and click EDIT.
- Add the Ruby directory to the end of the variable value list, and click OK.
- Under System Variables, select PATHEXT, and click EDIT.
- Add .RB and .RBW to the variable value list, and click OK.
- After installation, enter the following command in the command line to make sure everything works properly:
$ ruby -v ruby 2.2.3
- If everything works properly, the version of the installed Ruby interpreter will be output, as shown above. If you installed another version, a different version will be displayed.