Skip to main content

Fudgie's glTail with Chipmunk on MS Windows!

Hey folks,

It has been a while. Recently I have been busy with other stuff besides the usual, but a friend of mine suggested (and I completely agree) to be a good utilitarian and post something that will bring the greatest happiness for the greatest number of users :)

Which is this:

but on Windows...

My impression after solving this puzzle is that a number of folks have been getting stuck on implementing Fudgie's glTail (a real-time log file visualization tool) to work on Windows with Chipmunk (a 2D physics game engine).

Here is my take on what I did to get it working (after lots of trials and errors). Before you start doing anything, read this post completely to make sure you won't miss some crucial detail beforehand. Basically it came to the following 13 steps:

Now you need the following two packages:

  1. ruby-opengl 0.40.1
  2. net-ssh 1.1.4

Make sure that you download and install the correct version.

Right, so lets see how to put these two packages into Ruby commands:

  • Fire up the package manager of Ruby
    (Start Menu > Ruby > RubyGems > RubyGems Package Manager)
    NOTE: Packages might take some time to download/install.
  • Type: gem install ruby-opengl --version 0.40.1 [ENTER]
  • Type: 2 [ENTER] for option #2 - ruby-opengl 0.40.1 (i386-mswin32)
  • Type: gem install -y net-ssh -v 1.1.4

So far, so good. Now for the crucial part:

Almost done, (which is like a .DLL file) is set.

Now when you configure your .yaml file, as was mentioned in the documentation at, you may need to do the following:

  • In the config file you may use IP-Addresses instead of host names. That worked for me somehow when I was trying to connect to my remote host.
  • Check in the bin directory of glTail if the gl_tail file has an extension, if not put .rb as an extension.

Ok, so now its time to run the script. CD in MS-DOS to the root of your glTail directory and type the following:
bin\gl_tail.rb config.yaml

If you see any problems, you may need to do some code editing in the Ruby Files. Do not be troubled, after all this time, this will just take a few more minutes. The error I got and, which solution is given below is a TYPE_ERROR where a function is called and expects one parameter to be an INTEGER but this parameter is NIL during run-time and Ruby does not find that very 24K gold standard, so:

  • Fire up your favorite good ol' code editor and open the file element.rb in the lib\gl_tail\ directory, go to line 276. If I'm not mistaken you should see something like glDeleteLists(@text_list,1).
  • @text_list is NIL for some unknown reason, so we need to wrap an IF statement around it, like this:
    if @text_list != nil
  • Now, Ruby will notice another NIL issue, but this time on line 255. Do the same as the previous one, and wrap the @text_list with the above IF-statement.

If all comes to pass, you now are the proud user of a Chipmunk Newton-based awesome log file visualizer... ON WINDOWS MAN!

I would personally like to thank all the folks that have worked on this, including:
- DKnight
- Sebastian Hungerecker-2
- Jim
And of course not excluding:
- Mr.Fudgie
- And the folks at Chipmunk


Unknown said…
Thanks for the detailed walk-through. I was pretty certain it would be possible under Windows, but as I don't even have Windows installed it was a bit hard to debug. :-)
Francis Laclé said…
No problem, its nice to have a tool that makes real-time log tailing worthwhile ;)

Keep it up!
Patrick Moore said…
Really keen to get this working, but I get the following errors. I've checked against the code in 'font_store.rb' and font.bin is definitely there. I'm unfamiliar with Rails though.

I followed your instructions, made those edits, set up copssh ( on a Windows 2003R2 webserver, and edited the config file to point at the IIS log (e.g. /cygdrive/d/LogFiles/W3SVC2041809229/ex091007.log)
I get:

C:/inetpub/wwwroot/gltail/bin/../lib/gl_tail/font_store.rb:38:in `generate_textures': undefined method `ord' for 0:Fixnum (NoMethodError)
from C:/inetpub/wwwroot/gltail/bin/../lib/gl_tail/font_store.rb:37:in`upto'
from C:/inetpub/wwwroot/gltail/bin/../lib/gl_tail/font_store.rb:37:in`generate_textures'
from C:/inetpub/wwwroot/gltail/bin/../lib/gl_tail/font_store.rb:36:in`upto'
from C:/inetpub/wwwroot/gltail/bin/../lib/gl_tail/font_store.rb:in`generate_textures'
from C:/inetpub/wwwroot/gltail/bin/../lib/gl_tail/font_store.rb:31:in`upto'
from C:/inetpub/wwwroot/gltail/bin/../lib/gl_tail/font_store.rb:31:in `generate_textures'
from C:/inetpub/wwwroot/gltail/bin/../lib/gl_tail/font_store.rb:69:in `generate_font'
from C:/inetpub/wwwroot/gltail/bin/../lib/gl_tail/engine.rb:345:in `start'
from C:/inetpub/wwwroot/gltail/bin/gl_tail.rb:111

Any ideas?
Unknown said…
Either use ruby 1.9.1 or remove the .ord part of the offending lines.
Patrick Moore said…
Thanks! However now I get:
!!! Could not authenticate on x.x.x.x. Make sure you have set the username and password correctly...

But using PuTTY with those same credentials connects to that machine fine. The build of copssh I installed on that servers apparently incorporates OpenSSH 5.3p1. Could there be some version intolerance?
Francis Laclé said…

I also got a problem while trying to connect. It was resolved when I used IP-Addresses instead of host names.
Good thing it works with PuTTY though.

@Fudge, thanks for the quick reply :)
Patrick Moore said…
After switching to the latest version of net-ssh it worked ok. Now though, I get no output in the OpenGL windows except the two grey vertical bars. If I run with --debug I do see log output, but it doesn't draw blobs. Updating to a newer ruby-opengl doesn't help.
Did you encounter this?
Francis Laclé said…
Do you get any errors? Could you paste the log output?
Unknown said…
Do you have to corresponding blocks defined in your config.yaml?

Popular posts from this blog

But Google what about mobile phones that do not support Javascript?

In the global device market, there are still between 0.2% and 5.4% of phones that do not support Javascript, at least in these set of countries according to this site. In case your mobile website falls within this set than what do you do when you want to optimize CSS delivery by deferring the loading of some CSS but still serving the complete CSS to non-Javascript websites?

A Short Online Letter to the Board of Alphabet Inc.

Dear Chairman Hennessy, I would like to openly share a question that kept coming back to me in the past couple of days, and that gave me courage to write a short open letter for the first time in my life. While catching up with daily news I came across a couple of articles in the past week alone, namely on the world’s remaining wilderness areas that are under threat . That the Earth’s oceans have retained 60 percent more heat each year than we’ve previously thought, that humanity has wiped out 60% of animal populations since 1970, that China has legalised rhino horn and tiger bone usage after 25 years, to calling for urgent action to develop technologies for negative emissions because our clean energy efforts won’t be enough. Here’s the question: is there actually a future for us, for your company, for humanity and our natural environment? What we do today will lay down the trajectory for our carrying capacity on Earth. Instead of investing in self-driving transportation and

A scalable geometrical model for muscle and tendon units: An algorithmic solution on how to fit a template muscle on a high resolution muscle mesh

The reason for this blog post is to share a bit on a particular hard problem that I've encountered during my Master's thesis with a broader audience. I will try my best to write it in plain English, but as the problem is complex expect this to be a lengthy post with domain specific terminology.