I’ll admit, most of my development is done on OSX. My primary “work”station at home is my early 2015 15” rMBP, and i’ve got a pretty optimized workflow on there for web development. However, for application development and games development my new desktop is my powerhouse…and it is a powerhouse!
Node, Ruby and Git
That being the case, I don’t feel like Windows has the right command-line integration to truely be as optimised for the kind of gem and npm work that comes with web development. So the first thing that we’re going to want to do is get Windows playing happily with those two.
Node & NPM
First off, you want to install node and npm. To do that, head over to nodejs.org and download whichever version of Node that you want (either the LTS version or the Current). If you’re confused by which one you will need, this link has the details for the release plan. The Node installer comes with NPM now (it didn’t used to), so once you run the installer, you should be all set!.
To validate node, open Command Prompt or Windows Powershell and run:
You should get a response that looks something like:
To check NPM, it’s the same thing:
PS C:\Users\Stephen> npm -v 2.14.12
OK Cool! So that’s Node/NPM installed!
Ruby & GEM
The next thing you’re going to want to do is install Ruby. This is slightly more tricky than Node, but not by much.
First, grab the Ruby Installer. You’re going to want the Ruby Installer for Windows (I chose the 2.2.4 x64 variant), and you’re also going to want the DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe (The Ruby Development Kit, you’ll see why in a sec..)
So go ahead and install Ruby. It’ll install it somewhere like
C:\Ruby2.2.4, which is fine. Check that it’s installed by issuing
ruby -v, which should output something like:
ruby 2.2.4p230 (2015-12-16 revision 53155) [x64-mingw32]
Once that’s done, you’re going to want to install the Ruby Development Kit that you also downloaded. This one is slightly more tricky.
- Firstly, run the .exe that you downloaded and have it extract somewhere that it’s going to live (I extracted mine to
- When it’s finished extracting, you need to
cdinto that directory and run
ruby dk.rb init, which generates a config file containing the path to your Ruby installation.
- Once you’ve validated the
config.ymlfile that it creates (you can use
ruby dk.rb reviewfor that), run
ruby dk.rb installto complete the installation.
Finally, to validate that you’ve installed GEM correctly, you can do something like:
gem install json –platform=ruby
ruby -rubygems -e “require ‘json’; puts JSON.load(‘’).inspect”
Which will confirm that both GEM and Ruby are working.
So now you also have Ruby installed on the command-line. Good Job!
The final piece of this puzzle (from a toolchain point of view), is Git. On Linux and OSX this is really straightforward (either
sudo apt-get install git, or install xcode tools), but on Windows it’s a separate application that hooks (optionally) into cmd.
Head over to the git website and download the git tools for Windows. Once downloaded, you need to start the installation, but change a couple of the install options along the way.
- Make sure that the “Use git on Windows Command Prompt” option is selected, otherwise you will only be able to use git tools in git-bash (custom bash instance)
- Make sure that you use “pull files as-is, push as Unix line-endings” if you are doing cross-platform development
- Make sure that you allow GIT to use the command prompt options
Once that’s installed, you can validate it by doing:
PS C:\Users\Stephen> git --version git version 2.7.1.windows.1