Wednesday, 16 May 2012

Visual Ruby and Glade: cannot create instance of abstract (non-instantiatable) type `GtkBox'

If you get the error:

GLib-GObject-WARNING **:cannot create instance of abstract (non-instantiatable) type `GtkBox'

When using Visual Ruby and/or Glade to design a Ruby-GNOME2 user interface, the reason is that the latest version of Glade (3.10) has dropped support for Gtk::VBox and Gtk::HBox - it replaces them both with Gtk::Box. This breaks Gtk::Builder. The solution is to use Glade 3.08, which can be installed (for Ubuntu, and Ubuntu based distributions such as Linux Mint) using:
 sudo apt-get install glade-gtk2=3.8.0-0ubuntu3  


To find the correct version/package name for your distribution, use:
 apt-cache showpkg glade-gtk2  

and find version 3.8.0.

If using Visual Ruby, be sure to update the Glade Command Line setting by going to Tools -> Settings and entering
 glade-gtk2  

in the Glade Command Line box.

No comments:

Post a Comment

Please leave a comment if you find this blog helpful or interesting! I'd love to hear from you!