Skip to content

Installing on a Windows machine

johnadamsDFID edited this page Jul 29, 2015 · 5 revisions

Note: this install works if you are on the physical network, but not on the VPN.

##Installing on Windows

Step 1: Install Ruby

Use Ruby Installer to install Ruby 2.2.2 on your machine.

Add Ruby to your PATH variable manually:

echo %PATH%
set PATH = C:\Ruby22\bin;%PATH%

To add Ruby to your PATH permanently, then follow these instructions.

Step 2: Download the code for DevTracker-API

If git is setup, do a clone, otherwise download and unzip from https://github.com/DFID/devtracker-from-api.

Rename your folder to devtracker-from-api if it is not already that name.

Step 3: Install the Ruby gems needed

(I couldn't get bundler to work properly - see below)

gem install sinatra #takes a few minutes, be patient
gem install bundler
gem install rest-open-uri
gem install rest-client
gem install json_pure
gem install activesupport

gem install rerun #for rerun support (see below)

Step 4: Run the application

cd [your path to]\devtracker-from-api\site
ruby devtracker.rb

Note: Bundler/Gemfile issue

If you try

gem install json
# or
bundle install

You get an error message:

ERROR:  Error installing json:
        ERROR: Failed to build gem native extension

I tried following the instructions to install the Ruby DevKit

But the only workaround is to use the json_pure gem instead of the json gem.

gem install json_pure

I need to work out how to update the Gemfile and Gemfile_lock to reflect this.

##Remaining challenge: Git workflow

How to get git commands working in the command line....