Devops Tools

Installation of Ruby on Rails on Windows

With this blog, we will learn Installation of Ruby on Rails (Rails) on Windows 10 in detailed and an easy step-by-step process.

Pre-requisite:

  1. Ruby
  2. Ruby gems
  3. Git
  4. IDE (Notepad can also be used)

Let’s start with installation of Ruby.

Installation of Ruby on Windows

Step 1. Check whether ruby is installed or not.
C:\Users\user> ruby -v
Step 2. To install Ruby on Windows, go to this link https://rubyinstaller.org/
Step 3.  Click on Download. It will navigate you to the download window.

Download the 64-bit .exe file (if your system is 32-bit then download x86 version and if using older forms like Vista then it is recommended to download Ruby 2.19)

Step 4. Run the rubyinstaller.exe file

*Make sure all the three boxes are checked.

Once the package will install, the ruby gems will be installed along with it.

Ruby gems: It is a package manager for Ruby and provides a standard format to distribute Ruby programs and libraries. 

Each gem has a name, version, and platform. For example, the rake gem has a 0.8.7 version. Rake’s platform is ruby, which means it works on any platform Ruby runs on.

 

Once you will click ‘Finish’, following command prompt will be displayed.

  • Note: They are just command prompt alternatives. You can ignore them and close the window to continue using your command prompt.
Step 5. Go to Command prompt and check the ruby installation.

Oopss.. We are required to set the path of Ruby bin folder in our Windows environment variables.

Step 6. Set the PATH :

a). Go to Sart → Type System

b). Click ‘Advanced system settings’

c). Click on ‘Environment Variables’

In ‘System variables’ section,scroll down and select ‘Path’ → Click ‘Edit’

d). Click on ‘New’, and provide the path to the bin folder of Ruby and click ‘OK’.

Step 7. Now check the Ruby version again from command prompt.

Voillaa!! We have installed Ruby successfully on Windows.

Installation of Ruby on Rails on Windows

Install Rails using Rubygems− With Rubygems loaded, you can install all of Rails and its dependencies using the following command through the command line −

C:\Users\user> gem install rails

You might get this security alert. Click on ‘Allow access’.

Note: It will take some time to install all dependencies. Therefore, while installing gem dependencies, a persistent internet connection is required.

Check Rails version:

C:\Users\user> rails -v

Congratulations!! We are now on RAILS 5.2.1 on Windows.

To keep rails updated:

C:\Users\user> gem update rails
Please follow and like us: