Topic: [Ruby/XSLT] Problem processing XSLT

Hi everyone,

I have a problem using ruby/xslt. When i execute this code :

class Testxslt
  require 'rexml/document'
  require 'xml/xslt'

  def initialize
          xslt =

          xslt.xml = "#{RAILS_ROOT}/test.html"
          xslt.xsl = "#{RAILS_ROOT}/test.xsl"

          out = xslt.serve()
          puts out


I obtain this error :
./script/../config/../config/../app/models/testxslt.rb:11: [BUG] Bus Error
ruby 1.8.5 (2006-12-25) [i686-darwin8.8.1]

Abort trap

I tried this on very basics files just to test it(I checked that it works with other xslt processor and it does).

So if somebody have some hints they would be welcome. Or if you know a better way to process xslt files with ruby just let me know.

Re: [Ruby/XSLT] Problem processing XSLT

Actually it seems i m not able to install ruby/XSLT properly. I m working on Mac OSX and during the installation i get this :

cgcpc4:~/Desktop/ruby-xslt admin$ ruby extconf.rb
checking for xmlParseDoc() in -lxml2... yes
checking for xsltParseStylesheetFile() in -lxslt... yes
checking for exsltRegisterAll() in -lexslt... yes
creating extconf.h
creating Makefile
/opt/local/lib/ruby/1.8/mkmf.rb:1104: warning: global variable `$preload' not initialized

cgcpc4:~/Desktop/ruby-xslt admin$ make
gcc -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin8.8.1 -I. -DRUBY_EXTCONF_H=\"extconf.h\" -O -pipe -I/opt/local/include -fno-common -g -Wall -I/opt/local/include/libxml2 -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/include -O -pipe -I/opt/local/include  -fno-common -pipe -fno-common -DUSE_ERROR_HANDLER -DUSE_EXSLT  -c extfunc.c
gcc -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin8.8.1 -I. -DRUBY_EXTCONF_H=\"extconf.h\" -O -pipe -I/opt/local/include -fno-common -g -Wall -I/opt/local/include/libxml2 -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/include -O -pipe -I/opt/local/include  -fno-common -pipe -fno-common -DUSE_ERROR_HANDLER -DUSE_EXSLT  -c parameters.c
gcc -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin8.8.1 -I. -DRUBY_EXTCONF_H=\"extconf.h\" -O -pipe -I/opt/local/include -fno-common -g -Wall -I/opt/local/include/libxml2 -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/include -O -pipe -I/opt/local/include  -fno-common -pipe -fno-common -DUSE_ERROR_HANDLER -DUSE_EXSLT  -c parser.c
gcc -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin8.8.1 -I. -DRUBY_EXTCONF_H=\"extconf.h\" -O -pipe -I/opt/local/include -fno-common -g -Wall -I/opt/local/include/libxml2 -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/include -O -pipe -I/opt/local/include  -fno-common -pipe -fno-common -DUSE_ERROR_HANDLER -DUSE_EXSLT  -c rb_utils.c
gcc -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin8.8.1 -I. -DRUBY_EXTCONF_H=\"extconf.h\" -O -pipe -I/opt/local/include -fno-common -g -Wall -I/opt/local/include/libxml2 -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/include -O -pipe -I/opt/local/include  -fno-common -pipe -fno-common -DUSE_ERROR_HANDLER -DUSE_EXSLT  -c xslt_lib.c
cc -dynamic -bundle -undefined suppress -flat_namespace -L/opt/local/lib   -L"/opt/local/lib" -o xslt_lib.bundle extfunc.o parameters.o parser.o rb_utils.o xslt_lib.o  -lruby -lexslt -lxslt -lxml2  -lpthread -ldl -lobjc
/usr/bin/ld: warning multiple definitions of symbol _setregid
/opt/local/lib/libruby.dylib(process.o) definition of _setregid
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libpthread.dylib(setregid.So) definition of _setregid
/usr/bin/ld: warning multiple definitions of symbol _setreuid
/opt/local/lib/libruby.dylib(process.o) definition of _setreuid
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libpthread.dylib(setreuid.So) definition of _setreuid

cgcpc4:~/Desktop/ruby-xslt admin$ make test
Loaded suite test
..I/O warning : failed to load external entity "result.xsl"
F..test.rb:183: [BUG] Bus Error
ruby 1.8.5 (2006-12-25) [i686-darwin8.8.1]

make: *** [test] Error 134

Did somebody got the same problem ? Does somebody installed this on a mac and would have some hints ?

Thanks for your help