< Installing Ruby & setting it up

With a lot of new development techniques popping up all the time, there was one that got my interest. I had toyed with the idea of playing with Jekyll, which is a static site generator and one that could be hosted at GitHub Pages.

However to have Jekyll on my local development machine first, it required that I would have to have Ruby installed. If you’re reading this on a Mac, you’re okay there as Ruby is installed on Mac OS by default.

Head over to Ruby Installer, to get the correct versions of Ruby. As for which version to use, I chose 2.x which seemed to be fine with me, and because I’m using a 64bit CPU, I chose the x64 version. Do not forget to get the development kit as well, which is listed on the same page where you can download a Ruby installer for Windows. Get the one that matches the version you’re downloading and the right architecture (32bit or 64bit).

A couple of things that I’ve picked up and I’m sharing with you. Don’t install Ruby inside something like the Program Files folder, as Ruby will break because of the spaces in the name of the folder. Install it somewhere simple so that you can navigate to it easily something like C:\Development\Ruby. Make sure you have chosen the option to include the PATH as well.

Do the same for the Development Kit. When you have installed Ruby, and extracted the Development Kit, and run the commands in command prompt

cd c:\ [your DevKit folder]

Then once you are inside that folder do the following

ruby dk.rb init

This will initalise the install, and it sets you up for the installation by typing the below

ruby dk.rb install

At this point, congratulations! You have Ruby installed and configured on your machine. It is a good time to restart your machine now, so that Windows can recognise the path variable for Ruby.

To go with GitHub Pages, and with Jekyll in mind which will be covered in a journal post later. There is a known bug with Ruby especially when it comes to installing gems if you’re not using the latest release such as 2.4.x as it would return an error which would involve SSL certificates. Luis Lavena has posted a gist of a workaround/solution to this problem.

Ruby gems are basically packaged files which can help you develop something, and in this case I would get the gem GitHub-Pages via Ruby. This has a lot of packages which is packaged together, including Jekyll, and whatever else you would need to run a Jekyll site on GitHub Pages.