HomeHome ArchiveArchive

Embedding Ruby in Kylix/Delphi


Ruby is the interpreted scripting language for quick and easy object-oriented programming. It has many features to process text files and to do system management tasks (as in Perl). It is simple, straight-forward, extensible, and portable. This component embeds the Ruby interpreter in a Kylix/Delphi application.

Usage examples

   if ruby.EvalExpression('1+1') <> 2 then
    raise Exception.create('Ruby can''t calculate!');

  ruby.Expression.Text := 'print "Regexp".gsub!(/e.+/, "uby")';
  if ruby.Output <> 'Ruby' then
    raise Exception.create('Ruby can''t write!');

Download / Developement


  • Open Package Ruby.dpk
  • Options / Conditions
  • Install

Delphi/Kylix GIS components


The Delphi/Kylix GIS components connect your application with a WMS or UMN map server. The map viewer component has all the basic functionality for viewing, navigating and querying maps. WMS (Web Map Service) is a specification of the Open GIS Consortium supported by many free and commercial web mapping servers. You can use maps from the numerous public WMS or UMN sites with native GUI elements - without browser. These components are written as portable CLX components and tested with Kylix 3 and Delphi 7.


Map viewer component integrated in the demo application


  • Included connectors: WMS, UMN map server
  • Optional overview map
  • Zoom, Pan
  • Support for multiple layers
  • Querying for information at a map position
  • Querying multiple layers (drill down)
  • Legend from UMN map server


  • TCmpUMNClient: component to connect to a UMN map server
  • TCmpWMSClient: component to connect to a WMS map server
  • TMapViewer: viewer component to view and navigate on a map


You can download the fully functional demo components

The only restriction of the demo components is an embedded copyright text.

Status / Support

This software is not maintained anymore and no support is available.

If you are interested in taking over developement, we will hand over the source code under an open source license. Please contact

gis at sourcepole.ch

Lists of WMS map server:

Synchronization from non-Java with Java through File Locks

Synchronization with Java through File Locks

Short version: use lockf/fcntl and not flock for synchronization through file locks with Java. When one process uses flock and the other lockf, then they will not be able to see each other’s locks.

Rant version: Java praises itself as being truly portable. Since 1.4 it also has a platform-independent file locking mechanism that is visible accross process boundaries and is meant for synchronization with non-Java applications [1].

Although the manual talks lenghtily about platform issues [2] it stays completey silent on the fact, that if you want to synchronize with Java you must use the lockf/fcntl mechanism in non-Java applications in order to see Java’s file locks and in order for Java to be able to see the non-Java application’s ones.

How not documenting the fact leads to portable applications, in spite of the fact that many [3] other [4] languages use flock instead remains to be seen.

Tomas Pospisek


Installing Debian Sarge on a IBM HS20 Blade

Installing Debian Sarge Linux on a IBM HS20 Blade (HOWTO)

  1. Start the management interface on your local machine
  2. Open a console for the remote Blade
  3. Attach the local CDROM drive to the remote destination Blade
  4. Boot the remote Blade from the local CDROM
  5. Press <F1>(Using the console’s F1 button) in order to get into the install disk menu
  6. By using the respective function key jump into the menu with the special boot characters
  7. Choose and enter the command line that disables framebuffer (with framebuffer display, which is on by default you won’t see anything in the console)
  8. You will possibly need to switch around the console’s keyboard settings in order to be able to enter the “special” characters “/” and “=” (the console wouldn’t map the local swissgerman keyboard correctly. I had to use the US, the Italian and the German keyboard settings in order to be able to enter all the charcters I needed throughout the installation process)
  9. Now proceed with the installation which will quite soon fail, because the installer won’t find the CDROM drive, because it’s internally attached over USB
  10. Change into the next terminal with Alt-F2 and issue a modprobe usb-uhci which will load the required USB drivers. You should see this when you issue a dmesg to display the kernel messages
  11. Issue a hw-detect to make the Debian installer rescan the HW and this time detect the CDROM which is connected via the USB-storage and the SCSI-over-USB drivers
  12. Press Alt-F1 (click on the Alt and F1 buttons of the console) to return to the installer
  13. Press “OK” to let the installer search for the CDROM drive once more which it should find and you should be able to continue the install process
  14. At the machine where this procedure was tested, the two Broadcom BCM 5703 Tiga NetXtreme gigabit ethernet cards on the Blade were in trunking mode and thus Linux’ tg3.o driver wouldn’t be able to access the net out of the box. The connection to the switch had to be changed to “normal” mode in order for the driver to be able to communicate
  15. Now before you restart, be aware that currently the first SCSI disk /dev/sca1 for Linux is the SCSI over USB CDROM drive and the local hard disk on the local SCSI controller at /dev/scb1. But as soon as you’ll restart, the USB driver will not yet be installed and instead the local SCSI contoller will be at /dev/sca1
  16. Thus when you restart, as soon as you get into GRUB’s boot loader menu change the boot device from boot=/dev/scb1 to boot=/dev/sca1
  17. That’s it. Let me know if this HOWTO has helped you.


  1. We used the 2.4 kernel (==2.4.27-2-386)