# Ruby 1.9

**URL:** <https://www.ruby-forum.com/t/ruby-1-9/123690>\
**Category:** Ruby-Gnome 2\
**Created:** [December 19, 2007, 7:57pm UTC](https://www.ruby-forum.com/t/ruby-1-9/123690 "2007-12-19T19:57:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![liberte](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9e8a1a/32.png) [@liberte](https://www.ruby-forum.com/u/liberte)\
**Post date:** [December 19, 2007, 7:57pm UTC](https://www.ruby-forum.com/t/ruby-1-9/123690/1 "2007-12-19T19:57:48Z")

</div>

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](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]
