Why Did He Do This ???

Ok, by now everyone is aware of my undying admiration for this genius of Ruby Kung-Foo. As the founding God Father of the anynines Anynines.com dynasty, Julian Fischer has lead his team thru thick and thin tackling the PaaS digital-sphere.

But I cannot for the life of me figure out WHY he chose to shave off his lush red bristles for a more swave look. Here are photos to prove it:

The ‘after’ look as swave 007 sans-beard : JulianAfterShaving


and the before-image of this more rugged He-man look, out for a night of fun on the haupt-strasse :B4



50 Years in The Saddle

the days have passed me by cos time flys when you’re having fun, but it is the 50th anniversary of the IBM mainframe. Have fond memories of many of these beasties, when programmers coded in ink and it took a man to program them, damn !   Bang fist on desk :)


See this: http://www.bbc.com/news/technology-26886579 

which evoked further reminiscences of my first kit on a much earlier post here http://jnorthr.wordpress.com/2013/02/02/my-first-computer/

loved them all a lot more than the later toys from intel   ;-}


enjoy !!!

and a happy monday to you too !!

Install Asciidoctor Command Line Tool – Part Three

If you need background as to why i had to do this, read about this in part one.

If you need to install ruby or the gem manager on your windows XP system, then read about it in part two.

You need ruby and the gem manager on your XP system before you can install the asciidoctor gem. If you’ve followed my previous post, by now you should have a ruby devkit on your C:\ drive and you will need to have changed into your devkit folder, before you run the gem install command below :

// --------------------------------
$ dir
HP_Owner@HP-PAVILLION c:\devkit >
$ gem install asciidoctor --platform=ruby
Fetching: asciidoctor-0.1.4.gem (100%)
Successfully installed asciidoctor-0.1.4
1 gem installed
Installing ri documentation for asciidoctor-0.1.4...
Installing RDoc documentation for asciidoctor-0.1.4...

Confirm Success

Now it’s time to confirm we’ve successfully installed this gem, so see the following joblog from my install session :

$ asciidoctor -v
Usage: asciidoctor [OPTION]... FILE...
Translate the AsciiDoc source FILE or FILE(s) into the backend output format (e.g., HTML 5, DocBook 4.5, etc.)
By default, the output is written to a file with the basename of the source file and the appropriate extension.
Example: asciidoctor -b html5 source.asciidoc

-v, --verbose enable verbose mode (default: false)
 -b, --backend BACKEND set output format backend (default: html5)
 -d, --doctype DOCTYPE document type to use when rendering output: [article, book, manpage, inline] (default: article)
 -o, --out-file FILE output file (default: based on input file path); use - to output to STDOUT
 --safe set safe mode level to safe (default: unsafe)
 enables include macros, but restricts access to ancestor paths of source file
 provided for compatibility with the asciidoc command
 -S, --safe-mode SAFE_MODE set safe mode level explicitly: [unsafe, safe, server, secure] (default: unsafe)
 disables potentially dangerous macros in source files, such as include::[]
 -s, --no-header-footer suppress output of header and footer (default: false)
 -n, --section-numbers auto-number section titles in the HTML backend; disabled by default
 -e, --eruby ERUBY specify eRuby implementation to render built-in templates: [erb, erubis] (default: erb)
 -C, --compact compact the output by removing blank lines (default: false)
 -a key[=value],key2[=value2],...,
 --attribute a list of document attributes to set in the form of key, key! or key=value pair
 unless @ is appended to the value, these attributes take precedence over attributes
 defined in the source document
 -T, --template-dir DIR a directory containing custom render templates that override the built-in set (requires tilt gem
 may be specified multiple times
 -E, --template-engine NAME template engine to use for the custom render templates (loads gem on demand)
 -B, --base-dir DIR base directory containing the document and resources (default: directory of source file)
 -D, --destination-dir DIR destination output directory (default: directory of source file)
 --trace include backtrace information on errors (default: false)
 -h, --help show this message
 -V, --version display the version


Look for the asciidoctor version number in the details. Ok, i used the wrong option as -v should have been uppercase as -V so try that and you should see something similar to this :

Asciidoctor 0.1.4 [http://asciidoctor.org]

Nice one ! :-)


Install Cloud Foundry CF Command Line Tool – Part Two

If you need background as to why i had to do this, read about this in part one.

Anynines.com PaaS is a cloud foundry platform as a service (PaaS) i dearly love, and ok, i’ll admit it, i’m addicted to, so i MUST have it ! Now !! Bitte schon!!

That means i had to put myself thru the ordeal of installing ( yet again on an old machine that’s going out the door ), yes, you guessed it, Ruby and it’s gems. Why ? Cos i need the GEM install tool to give me the CF command line tool that my apps need to talk to anynines.

Does Windows XP like Ruby and it’s gems ? Well if provoked, yes it does rather.

rubyinstaller.org/downloads/To install ruby on your windows XP, go here: http://rubyinstaller.org/downloads/

The Ruby Installer

For windows XP, i chose to click on and download version Ruby 1.9.3-p545, so i downloaded (see screenshot red/yellow box top left) and unzipped that then double clicked to install ruby.

After install, opened command terminal session to confirm ruby was running.

What’s This Batman ?

Did you know that off-the-bat, ruby does NOT include the bits needed to run properly on windowsXp systems ? Holy bats guano, Batman!  Me neither! So how do we coax it to do so ?

We need to also install the ruby build tool called the devkit. Look at that screenshot above. See lower right in red/yellow BUILD YOUR OWN title and click that for  instructions on how to download a copy of the devkit into your system. It explains a lot but where do you download from ? Well look at screen shot above middle left, under the title

Development Kit

For use with Ruby 1.8.7 and 1.9.3:

since we’re using ruby 1.9.3 for windows XP 32 bit kit, click that link (or mine here) to download the devkit into your browser’s download folder.

Next we need to copy this downloaded tool into a safe place on your C:\ drive. Open a command console session. Click START button lower left, the select RUN then type CMD to start a command console session. What i did was this :

cd C:\
 mkdir devkit
 cd devkit/
 $ ruby dk.rb init
 $ ruby dk.rb install
 $ gem install bson_ext --platform=ruby

after making the devkit directory, copied the devkit tool from my browser’s download directory into c:\devkit, then ran ruby dk.rb init, etc.  The ‘gem install…’ command just confirms everything is tickety-boo (that’s a technical term)…

Satish Talim's MiracleHow I Done It

As with all things technical these days, i had to rely on info from other sources. In this case, a wonderful bit of magic came from Satish Talim who, by the looks of his photo, must have pulled out all his hair to figure this one out !!! Thanks 2 u Satish !!

Clix pix to read this nice overview from Satish Talim :

Jeepers Batman !

Now we can understand why we need the extra bit of syntax –platform=ruby for a gem install on windows XP systems. Look closely here:Screen Shot 03-30-14 at 06.12 PM

Ok, got that ? If i ever had the urge to learn ruby programming, i’d called on Satish, but please pass me the smelling salts first cos i feel faint :-P Naw, couldn’t stand another whimpy scripty poser thing, just give me a man’s programming language ! Yes, COBOL !! Bang fist on table :-D

Does It All Hang Together ?

To confirm GEM is installed:

C:\devkit gem
RubyGems is a sophisticated package manager for Ruby.  This is a
basic help message containing pointers to more information.

    gem -h/--help
    gem -v/--version
    gem command [arguments...] [options...]

    gem install rake
    gem list --local
    gem build package.gemspec
    gem help install

  Further help:
    gem help commands            list all 'gem' commands
    gem help examples            show some examples of usage
    gem help platforms           show information about platforms
    gem help <COMMAND>           show help on COMMAND
                                   (e.g. 'gem help install')
    gem server                   present a web page at
                                 with info about installed gems
  Further information:

and now to the pasty resistance, we can (at last) install our beloved CF tool like this:

$ gem install cf --platform=ruby

and to check which version of the CF tool we have, get the version by using the -v option with the CF tool.

$ cf -v
cf 5.4.7

Nice !! Now back to my beloved anynines !



Install Cloud Foundry CF Command Line Tool – Part One

Microsoft Windows XP

Microsoft Windows XP

HP Pavillion

HP Pavillion

Ok, please don’t laugh, but i still use windowsXP as it’s rather reliable and un-complicated. Have an aging HP Pavillion desktop computer that i’ve had to bring out of storage. Was in a rather cold place so this may caused some of my troubles. After power-up this system would re-boot itself every few hours, then it became so bad it would reboot itself every few minutes and disk access was  problematic too. Think it finally trashed my hard disk as it would not read that either.

Had a copy of Lubuntu 13.10 install disk that i put into this machine. Did you know it has a memory tester utility on the boot loader screen ? Well i never noticed that until now. So ran the memory utility tester. It ran for 30 minutes and reported a bunch of memory failures. Could not tell which bank of memory it was, as my system has four banks of 512MB. And this system needs a minimum of 2 banks, so i took out the left-most two chips and ran the memory test again. Still a few memory failures, so took out one of the installed banks and replaced it with one i had taken out, not knowing exactly which chips had the problems.

Ubuntu Live CD plus 2 broken memory chips

Ubuntu Live CD plus 2 broken memory chips

Restarted system and ran memory tests again for about 30 minutes and – bingo ! – no memory failures. OK that leaves me 1GB of memory but that’s enough for XP ! Wonderful !

Ok, next problem was a blitzed XP operating system, had to re-install that. Using another utility from the ubuntu dvd, i could see that when HP shipped me this box,  HP had kindly created a second disk partition holding a complete restore pack. By pressing keyboard F10 function key during reboot, the restore utility kicked in. It promised NOT to blitz any of my data, so i let it finish, and after about 30 minutes, i had a fresh XP system with my data – what a relief. The wireless network came up almost at once, after putting in the wireless WPA2 security key.

The next step was to restore all the lost user programs i had installed before. Yes, my Ruby, RubyGems and CF cloud foundry command line tools were lost. How to put those in again ?

Part Two reveals all !



Gradle Zip All Feature

Had a need to zip an entire website, all the bits and pieces, images, you name it. Had tried to write a gradle script that would do it from a folder like this:

folder layout of my web app

folder layout of my web app

and you would have thought it’d be easy-peasy. Well not so on my aging windows XP system. Any script using a gradle (type:Zip) task would bomb with ‘portion of file in use by another task’ – drat !

So dumped whole web app to a USB key and took it to my Apple Macbook 10.6.8. Using the same gradlew command this worked a charm:

 task zipAll(type: Zip) {
 from projectDir
 exclude 'build/**'

Basically, it says from the root of the directory folder of my web app, thats the ‘projectDir‘ declaration, zip it all but don’t include the sub-folder build/ or it’s contents either. Giving me:

Screen shot 2014-03-17 at 7.13.48 AM

Well now, that’s more like it ! And since i did not say where to store the zip file, gradle puts it into the build/distributions/ folder :

Screen shot 2014-03-17 at 7.15.52 AM

but also demonstrates why i excluded the build/ folder from the zip task as it would create a circular reference issue, i.e. zip into the build folder that gets included in the zip archive, which gets … :-P