[cairo] ruby-cairo and ruby-pango on MAC OS X

Davide Rambaldi davide.rambaldi at ifom-ieo-campus.it
Tue Aug 5 07:14:49 PDT 2008


Hi all, I would like to share some problems (and solutions) I had on  
OSX with the ruby bindings:

I am running a 10.4 system, then I have my ruby in /usr/local/bin/ 
ruby: version 1.8.7 (the system version is 1.8.2).

1. I have installed cairo with darwin ports... all OK
2. I download rcairo-1.6.3
3. Compiled RubyCocoa from source (to link at my ruby in /usr/local/bin)

4. now in rcairo-1.6.3:

ruby extconf.rb
checking for GCC... yes
checking for cairo version (>= 1.2.0)... yes
checking for rb_errinfo() in ruby.h... no
checking for enum ruby_value_type in ruby.h... no
checking Win32 OS... no
checking for CAIRO_HAS_QUARTZ_SURFACE in cairo.h... yes
checking for RubyCocoa... yes
creating Makefile

5. make

6. please note the the rcairo README file say:

  # the samples in the samples folder should be able
  # to run before installation.

7. so I run the text-on-path.rb sample

8. text-on-path.rb can't find the pango library

9. so I install the pango library with darwin ports and the ruby- 
gnome2-0.17.0-rc1 binding (ruby-pango is there)

10. I re-run the text-on-path.rb sample that say: "undefined method  
create_pango_layout" even if "require 'pango'" say true!

Now the solution of the problem: pango doesn't define the method  
create_pango_layout if he can't find the rcairo library!

So: FIRST install (make install) rcairo, then install ruby-pango and....
FINALLY the "create_pango_layout" method is there and I have my  
beautiful text-on-path!

I would change the README file of rcairo:

# the samples in the samples folder should be able
# to run before installation.

Was not true in my situation.

Hope this will help someone to save time!

DR


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20080805/1f31df0a/attachment.html 


More information about the cairo mailing list