Last Updated: April 12, 2018
· fool-dev

How to install Ruby on Rails on Windows

Follow those steps, actually, I have installed Ruby on Rails to many windows machine using these steps.

Step 1: Download Git BASH as the BASH emulation behaves just like the "git" command in LINUX and UNIX environments.

Step 1.1: Download and install latest NodeJS from here and check the NodeJS version

$ node -v
#=> v6.11.5 # or something like this

Step 2: Download the ruby latest version here and install it in your directory. Check the Ruby version

$ ruby -v
#=> ruby 2.3.1p112 (2016-04-26 revision 54768) [x64-mingw32]
# or something like this

Step 3: Download Devkit here take the suitable one for matching your windows bit like 32 or 64 bit

Step 4: Create a devkit folder inside Ruby directory that means where created a default directory after installing ruby software, something like this disk (:C) or (:D)/Ruby25/devkit/

Step 5: Extract the DevKit file inside the devkit folder

Step 6: Open your GIT BASH inside the devkit folder and run this two commands

$ ruby dk.rb init
$ ruby dk.rb install

if above command running properly then done.

Step 7: Now you can run rails command for installing inside ruby folder

$ gem install rails

Step 8: Check the Rails version

$ rails -v
#=> Rails 5.0.6

if till now all are steps is ok? that's it, now run rails command and create a rails project, like

$ rails new project
    create  README.md
    create  Rakefile
    create  config.ru
    create  .gitignore
    create  Gemfile
    create  app
    create  app/assets/config/manifest.js

Hope it helps