Rvm 1.9.2 & gtk2

hello folks -

sorry to bother you all again - but i just don’t seem to have any luck
trying to install gtk2, aside from the version that came with my package
manager and 1.8.7

i’ve tried every which way, and now i’m back to rvm, which seems like
a nice way to experiment without screwing things up too badly (i’ve done
everything from side by side package manger installs of 1.8.7 and 1.9.1,
to compiled from source versions of 1.9.2, using update-alternatives and
not… even tried with a fresh install on a virtual box using the same
system, and no luck…)

so… here’s what i’ve got now…
my system: ubuntu 10.04 lucid with ruby 1.8.7 and gtk 0.19.3 installed
system wide with no problems through the package manager

rvm installed with 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]
all dependencies mentioned in rvm notes installed:
build-essential, bison, openssl, libreadline6, libreadline6-dev, curl,
git-core, zlib1g, zlib1g-dev, libssl-dev, libyaml-dev, libsqlite3-0,
libsqlite3-dev, sqlite3, libxml2-dev, libxslt-dev, autoconf, libc6-dev,
ncurses-dev, subversion

i install gtk2,

#gem install gtk2

and everything seems ok

#Successfully installed glib2-0.90.8
#Successfully installed atk-0.90.8
#Successfully installed cairo-1.10.0
#Successfully installed pango-0.90.8
#Successfully installed gdk_pixbuf2-0.90.8
#Successfully installed gtk2-0.90.8
#6 gems installed

with the exception of an rdoc error from cairo:

(RDoc::Error) Name or symbol expected (got

#RDoc::RubyToken::TkSTAR:0x8df7b10)

maybe not a big deal… dunno. but “require ‘gtk2’” gets me this -

#require ‘gtk2’
#NameError: uninitialized constant Gdk::Drawable

why, oh why, can i not install gtk2?  i'm going crazy here - any

ideas are appreciated.

-j

In ruby-gnome2 changelog I see “fix require order”.
But 0.90.8 should not contained this bug.

Test to require “gdk_pixbuf2” before “gtk2”

2011/3/16 J. K. [email protected]:

not… even tried with a fresh install on a virtual box using the same
libsqlite3-dev, sqlite3, libxml2-dev, libxslt-dev, autoconf, libc6-dev,
#Successfully installed cairo-1.10.0
maybe not a big deal… dunno. but “require ‘gtk2’” gets me this -

ruby-gnome2-devel-en List Signup and Options


Vincent C.

hi vincent -

thanks for getting back…

Test to require “gdk_pixbuf2” before “gtk2”

ruby-1.9.2-p180 :001 > require ‘gdk_pixbuf2’
=> true
ruby-1.9.2-p180 :002 > require ‘gtk2’
NameError: uninitialized constant Gdk::Drawable

-j

hi vincent -

i believe that 1.9.2 comes with rubygems preinstalled, so that it is
not necessary to ‘require rubygems’ before requiring gems.

here’s the output from your suggestion:

ruby-1.9.2-p180 :001 > $:.each{|d| p Dir.glob(File.join(d, “gtk2*”))}
[]
[]
[]
[]
[]
[]
[]
[]
=> ["/home/jk/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1",
“/home/jk/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/i686-linux”,
“/home/jk/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby”,
“/home/jk/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/vendor_ruby/1.9.1”,
“/home/jk/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/vendor_ruby/1.9.1/i686-linux”,
“/home/jk/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/vendor_ruby”,
“/home/jk/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1”,
“/home/jk/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/i686-linux”]

2011/3/16 J. K. [email protected]:

NameError: uninitialized constant Gdk::Drawable

You have install gtk via a gem but it does not seem that you require
rubygems in your test.
It is pretty sure that you have an old an buggy install. Can you run
the below line in irb ?

$:.each{|d| p Dir.glob(File.join(d, “gtk2*”))}


Vincent C.