Open In App

How to install RubyGems in Windows?

Last Updated : 03 Sep, 2024
Summarize
Comments
Improve
Suggest changes
Share
Like Article
Like
Report

RubyGems is a Ruby package manager that provides Ruby programs and libraries (also known as Gems) and the tools associated with installing and managing Ruby packages and servers. The Ruby package management, RubyGems, makes it simple to install, manage, and utilize tools and libraries for Ruby applications. It is imperative to have RubyGems installed if you are using Ruby for development on a Windows PC.

In this article, we will look into the process of installing RubyGems on Windows.

Prerequisites

Make sure your machine satisfies the following prerequisites before you start:

  • Windows 10 or later: Although this tutorial is designed specifically for Windows 10, it should also function with earlier versions.
  • Ruby: Since RubyGems comes pre-loaded with Ruby, your machine must have Ruby installed.

Installing RubyGems on Windows:

Follow the below steps to install RubyGems on Windows:

Step 1: At first search, ruby download in your browser.

Step 2: Then Click on the Ruby installer for Windows.

Step 3: Then click on the Download Button.

Step 4: Then according to your operating system download your suitable one. For 64 bit download the following one

Step 5: Then click on the downloaded file. Then accept the license & click next.

Step 6: Then click on the Next button.

Step 7: Then we have to wait for some time to install.

Step 8: Then we have to go to the C drive of the computer. Then move to the Ruby 27-x64 folder. And then the bin folder. Then copy the path.

Step 9: Then we have to go to the environment variable.

environment variable

Step 10: Then we will move to the path & insert the copied path.

Step 11: Then after installing Ruby will open & we have to click Enter.

Step 12: After waiting some time again we have to click Enter. Then it will close.

Step 13: Then we will check it. We will open the command prompt. There we will type the following commands: 

ruby -v
ruby --version
gem -v

These will give the below-shown output:

Step 14: Then we will run a simple program. By writing the command ruby -e "puts 'Hello World...'". In ruby puts means to print anything. This will generate Hello World

Conclusion

RubyGems installation on Windows is very simple, provided that Ruby is installed correctly. You may concentrate more on work and less on setup by using RubyGems to manage Ruby libraries and dependencies.

Also Read


Next Article

Similar Reads