Ruby 1.9

Has anyone managed to compile RG2 under the latest
Ruby 1.9? I’m following the instructions on the wiki,
ruby 1.8 builds perfectly, but ruby 1.9 not so (this
is with SVN trunk).

During the make, there are a bunch of errors like:
error: ‘struct RString’ has no member named ‘ptr’
error: ‘struct RString’ has no member named ‘len’

These are easily fixed by replacing all occurrences of
RSTRING(str)->len with RSTRING_LEN(str) and similarly

It then complains about a missing node.h file in
rbglib_mainloop.c, so I changed it from
#include <node.h>
#include <ruby/node.h>
which seems to be the new structure under 1.9.

Now the error looks like this:
ruby-gnome2-svn/glib/src/rbglib_mainloop.c:105: error:
expected declaration specifiers or ‘…’ before

And a bunch of subsequent errors from the same file,
all to do with threads.

Can anyone help?


PS. my edited version of the Rg2 source is here:

Also I’m on UBuntu Gutsy with ruby 1.9.0 (2007-11-28
patchlevel 0) [i686-linux]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs