I. Installing ruby
Download Address:
- Official website:Downloads
- Domestic:RubyInstaller for Windows – Domestic mirrors
If you’re about to start using Ruby but don’t know which version to install, we recommend using theRuby+Devkit 3.2.X (x64)Installer. It provides the largest number of Gem that can be compatible and willMSYS2 DevkitInstalled with Ruby so that Gem with C extensions can be compiled immediately. The 32-bit (x86) version is recommended only if you have a need to have to use custom 32-bit DLLs or COM libraries (binary object files).
1. Download the resource and double-click to run it (as above)
2. Install as follows
3. The window automatically pops up as follows, and then enter 3.
4. After the installation is complete, open the command line and run ruby -v on the command line to display the version number. If the Ruby version number is displayed normally, the installation was successful.
II. Installing RubyGems
RubyGems (gems) is a Ruby packaging system for packaging Rails components. It provides a standard format for distributing Ruby programs and libraries, as well as a tool for managing the installation of programs. It provides a standard format for distributing Ruby programs and libraries, as well as a tool for managing package installations. the gem system is similar to the yum utility in redhat, or the apt-get utility in debian. To install the gem system, continue typing the command in the console: gem update –system
fromDownload RubyGems | RubyGems.org | Ruby community Gem hosting Download the latest version of rubygems
- Download from above
- Unpack into a directory and
cd
there - Install with:
ruby setup.rb
4. After the installation is complete, open the command line and run gem -v from the command line to display the version number. If the gem version number is displayed normally, the installation is successful.