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:
ruby-gnome2-svn/gtkmozembed/src/rbgtkmozembed.c:481:
error: ‘struct RString’ has no member named ‘ptr’
ruby-gnome2-svn/gtkmozembed/src/rbgtkmozembed.c:482:
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
for RSTRING_PTR.

It then complains about a missing node.h file in
rbglib_mainloop.c, so I changed it from
#include <node.h>
to
#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
‘rb_thread_t’

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

Can anyone help?

best,
Dan

PS. my edited version of the Rg2 source is here:
http://donttreadonme.co.uk/ruby-gnome2-svn-edited-for-19.tar.gz

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