Forum: Ruby-Gnome 2 NameError: undefined method `color_selection' for class `Gtk::ColorSelectionDialog'

Posted by Grant Schoep (matobinder)
on 2012-02-05 19:39
(Received via mailing list)
After getting past my last issue, I can compile gtk2 just fine But
when I do a require 'gtk2', I get an error.

Here's a quick example of the error from just doing the require by
itself in irb.

irb(main):001:0> require 'gtk2'
NameError: undefined method `color_selection' for class
`Gtk::ColorSelectionDialog'
        from 
/mytest/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'
        from 
/mytest/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'
        from /mytest/ruby/lib/ruby/site_ruby/1.9.1/gtk2/base.rb:25:in
`rescue in <top (required)>'
        from /mytest/ruby/lib/ruby/site_ruby/1.9.1/gtk2/base.rb:21:in
`<top (required)>'
        from 
/mytest/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'
        from 
/mytest/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'
        from /mytest/ruby/lib/ruby/site_ruby/1.9.1/gtk2.rb:11:in `<top
(required)>'
        from 
/mytest/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'
        from 
/mytest/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'
        from (irb):1
        from /mytest/ruby/bin/irb:12:in `<main>'

I'm using a rather basic ruby install to reproduce this.

ruby-1.9.3p0 (built myself)
pkg-config-1.1.3.gem (from gem)
cairo-1.10.2.gem (from gem)

I see this with both the ruby-gnome2-1.1.2 release, and the latest
snapshot(as of Feb 05, 2012) from github

The machine it is running on is RHEL 5.7, which has
  gcc 4.1.2 (Red Hat 4.1.2-51)
  gtk2-2.10.4-21.el5_5.6
  cairo-1.2.4-5.el5

So I see     RG_DEF_ALIAS("colorsel", "color_selection"); in
"rbgtkcolorselectiondialog.c"

Indeed, I don't see, I'm guessing, a rg_color_selection method?

I dug on this for a bit, but got tired. Maybe I'll get luck and figure
it out, any ideas?
Thanks
Posted by Kouhei Sutou (Guest)
on 2012-02-06 13:56
(Received via mailing list)
Hi,

In <CAC6rHiqBY_Sq2hc4ivvSxcy-EEo7ALwO0Ai1s+MWaX8nxR2=tA@mail.gmail.com>
  "[ruby-gnome2-devel-en] NameError: undefined method `color_selection' 
for class `Gtk::ColorSelectionDialog'" on Sun, 5 Feb 2012 11:39:06 
-0700,
  grant schoep <matobinder@gmail.com> wrote:

> `<top (required)>'
>         from (irb):1
>
> I dug on this for a bit, but got tired. Maybe I'll get luck and figure
> it out, any ideas?

Thanks for your report.
Maybe I've fixed it in master:
  https://github.com/ruby-gnome2/ruby-gnome2/commit/...

Thanks,
--
kou
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.