File load error in RBA

edited May 2010 in KLayout Support

I'm writing a simple RBA script. In the beginning, I put
require 'rexml/document'
to handle an XML document.

On Windows (Ruby version is 1.8.7 (2009-12-24 patchlevel 248) [i386-mswin32])
this leads to a file load error saying:
| Ruby error: 'no such file to load -- rexml/document' (LoadError)
| ./test2c.rb:11:in `require'
| ./test2c.rb:11

If the script is directly fed to ruby as
$ruby test2c.rb
then the line concerned is passed normally (but with different error
at "app = RBA::Application.instance", which is reasonable).

This error does not take place on Linux (Ubuntu 9.04)
(Ruby version is 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux] )

Do I need additional/special setting on Windows to avoid this?



  • edited May 2010


    I probably forgot to mention that the Windows installation does not come with the full ruby runtime environment. I'll change that in the next release.

    Right now, you can install the ruby libraries on Windows yourself, i.e. from

    To point KLayout to the Ruby libraries you need to set the environment variable RUBYLIB accordingly:


    (this example assumes that you have installed Ruby at c:\ruby).

    Best regards,


  • edited November -1

    Thank you for your instruction.
    With the new environment variable "RUBYLIB"
    the problem has been solved.

Sign In or Register to comment.