Geeks With Blogs
Greg Malcolm Everything but the Perl

This tutorial is based on a short demo/talk I gave at the Columbus .NET Developers Group (CONDG) on IronRuby. It’s mostly designed for the .NET professional and making no assumptions of prior Ruby experience.

Installer In Part 1 we get everything installed.

IIRB In Part 2 we take IronRuby for a test drive

Cucumber In Part 3 we use it to integrate with Cucumber.

Installing IronRuby

Before we get started, my instructions are more or less the same as this:

… but with a little bit more elaboration on how to install the MRI and IronRuby.

If you already have it all installed, go straight to Part 2!

Step 1 – Install MRI (Matz’s Ruby Interpreter)

We will need the standard Ruby language installed so we have access to the Gems package installer. This makes it really easy to install additional Ruby libraries, like Rails and Cucumber.

Install the latest stable Windows version of Ruby from here:

I used the one click installer. At the time of writing the one-click installer installs Ruby 1.8.6.

Afterwards make sure you have the Ruby bin folder in your system path (It will probably be C:\Ruby\Bin):

 Ruby Path Screenshot

Step 2 – Install IronRuby

IronRuby is currently available on Codeplex and Github. Grabbing it from Codeplex is probably the easiest approach:

This will allow you to download the MSI Installer version. The current installer at this time or writing is ironruby-0.9.2.msi.

Also make sure IronRuby’s bin folder is now in the system path (mine is called C:\Program Files\IronRuby 0.9.2\bin):

 IronRuby Path Screenshot

Step 3 – Install Cucumber

The cucumber installation instructions on the Cucumber Github wiki are here:

I can’t really improve much on these remaining instructions. Just open a command prompt and do everything it says, with the exception of downloading and installing MRI and IronRuby. So just run all the commands, and create the icucumber.bat script file.

Our version will probably look more like this:

REM This is to tell IronRuby where to find gems.
@ "
C:\Program Files\IronRuby 0.9.2\bin\ir.exe" "c:\ruby\bin\cucumber" %* --no-color

NOTE: The --no-color option is a workaround for an issue with showing color in command terminals that exists in ruby at the moment on windows. You can try it with colors turned ont, but if its not fixed you will start seeing “←[36” symbols all your cucumber test output.

In Part 2 we will have a quick look at what you can achieve with IronRuby.



Posted on Thursday, November 5, 2009 8:16 PM | Back to top

Comments on this post: IronRuby and Cucumber - Installation (Part 1 of 3)

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Greg Malcolm | Powered by: