What version of rcairo, and ruby-gnome2 do I need to have
GDK#create_cairo_context? I get the following error

demo.rb:23:in `expose': undefined method `create_cairo_context' for
#<Gdk::Window:0xb724dd28 ptr=0x82bb290> (NoMethodError)
        from demo.rb:13:in `initialize'
        from demo.rb:74

when trying to run the following sample code:
#!/usr/bin/env ruby

require 'cairo'
require 'gtk2'
include Math

class DemiCercle < Gtk::DrawingArea
  attr_accessor :desp
  def initialize
    super
    add_events(Gdk::Event::BUTTON_PRESS_MASK |
Gdk::Event::BUTTON1_MOTION_MASK)
    signal_connect "expose_event" do |widget,event|
      expose(widget,event)
    end # do
    signal_connect "button_press_event" do |widget,event|
pressing(widget,event) end
    signal_connect "motion_notify_event" do |widget,event|
moving(widget,event) end

    @desp = 0.0
  end # initialize

  def expose(widget,event)
    # crc)er un contexte graphique
    context = widget.window.create_cairo_context

    context.rectangle(event.area.x, event.area.y,
                      event.area.width, event.area.height)

    context.clip()
    draw(context)
    return false
  end # expose

  def draw(context)
    rect = allocation()
    x = rect.x + rect.width / 2.0
    y = rect.y + rect.height / 2.0

    radius = [rect.width / 2.0, rect.height / 2.0].min - 5.0

    #context.arc(x, y, radius, 0,(1 * PI))
    context.arc(x, y, radius, 0 + @desp , (1.0 * PI) + @desp)

    context.set_source_rgb(0.7, 0.8, 0.1)
    context.fill_preserve()

    context.set_source_rgb(0, 0, 0)
    context.stroke()
  end

  def pressing(widget,event)
    pressing_x = event.x
  end

  def moving(widget,event)
    if (pressing(widget,event) - event.x) > 1
      @desp = @desp + 0.2
    else
      @desp = @desp - 0.1
    end
    draw(widget.window.create_cairo_context)
    queue_draw()
  end
end


Gtk.init
fen = Gtk::Window.new
fen.set_title("Cairo exemple 2")
fen.signal_connect("destroy") { Gtk.main_quit }
figure = DemiCercle.new
fen.add(figure)
fen.show_all

Gtk.main

I have the following libs installed on my Gentoo box:

nicodemus portage # emerge -p rcairo gtk+ ruby-gnome2
Calculating dependencies... done!
[ebuild   R   ] dev-ruby/rcairo-1.0.0  USE="-examples*"
[ebuild   R   ] x11-libs/gtk+-2.8.12  USE="-tiff*"
[ebuild   R   ] dev-ruby/ruby-gnome2-0.14.1

Thank,
Farrel