Book Review: Heads You Win

Recent experience with buildr

I have a pet project that I occasionally fiddle with.  When I started it (a few years back), it was to learn some of the spring framework features.  Subsequently, out of my interest, I also got the project building with various build tools.

These days, I do two things with the project.:
  • Upgrade dependencies and ensure it is working with the latest versions of the dependencies.
  • Ensure it is building with the latest versions of the build tools - maven, gradle and buildr.
Having set the context, let me now narrate my experiences getting the project building with the latest version of buildr.

It has been a while since I played with buildr.  These days, it is mostly ant, occasionally maven, and recently, gradle (courtesy Google - through Android Studio).

Maven is stable with very little happening.  Gradle is being continuously enhanced and is one of the most active build tools. (A different story - building an android project with each gradle upgrade)

I don't recall my system configuration when I last used buildr - could be a Mac, could be a 32-bit Windows.

My current system is a 64-bit Windows 8.1 with 64-bit JDK.  It did not have buildr.  So I started with the Installing & Running link.

One needs to have ruby to install buildr.  The link asked me to use the "one-click" installer and suggested I go with 1.8.6 version of ruby.

I found ruby-1.8.7 binary here and thought the last digit should not matter.

Having installed ruby, I followed the next line in the instruction

gem install buildr --platform mswin32

As it tries to install buildr, I get the following error:

Unable to resolve dependencies: buildr requires win32console1.3.2

Ok, maybe I should try it in bash I thought and repeated the exercise on a mingw32 bash shell

gem install buildr --platform mingw32

Now the error was

rjb native gem requires installed build tools

I now downloaded and installed the Development Kit. This is essentially nothing but a migw32 environment.

The installation went through fine, but buildr just hung from the command-line

Boy, I am not getting anywhere, am I.

Searching the web pages further, I saw people suggesting that for 64-bit Java, it is better to go the jruby way.  (The installation page goes on to mention about jruby installation though the instruction for Windows seems to  involve running a bash script). See buildr also requires Java and it appears that there is a 32-bit/64-bit conflict.

I now installed jruby and that in turn, installed ruby.  Using jruby, I now installed buildr

jruby -S gem install buildr

Before this, I also deleted my existing ruby and buildr installations (so that there is no conflict).

buildr finally started working.

buildr --version
Buildr 1.4.15 (JRuby 1.7.10)

jruby --version
jruby 1.7.10 (1.9.3p392) 2014-01-09 c4ecd6b on Java HotSpot(TM) 64-Bit Server VM
 1.7.0_51-b13 [Windows 8-amd64]


  1. Thank you very much for your explanation! This worked successfully on Windows 10 x64 with JDK 7 x64.


Post a Comment