# Rvm 1.9.2 & gtk2

**URL:** <https://www.ruby-forum.com/t/rvm-1-9-2-gtk2/204576>\
**Category:** Ruby-Gnome 2\
**Created:** [March 16, 2011, 3:04am UTC](https://www.ruby-forum.com/t/rvm-1-9-2-gtk2/204576 "2011-03-16T03:04:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [March 16, 2011, 3:04am UTC](https://www.ruby-forum.com/t/rvm-1-9-2-gtk2/204576/1 "2011-03-16T03:04:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![j\_k](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e9bcb4/32.png) [@j\_k](https://www.ruby-forum.com/u/j_k)\
**Post date:** [March 16, 2011, 6:41pm UTC](https://www.ruby-forum.com/t/rvm-1-9-2-gtk2/204576/2 "2011-03-16T18:41:13Z")

</div>

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. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> ## 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 -
> 
> [https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en](https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en)

–  
Vincent C.

---

<div class="post-metadata">

**Author:** ![j\_k](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e9bcb4/32.png) [@j\_k](https://www.ruby-forum.com/u/j_k)\
**Post date:** [March 16, 2011, 8:05pm UTC](https://www.ruby-forum.com/t/rvm-1-9-2-gtk2/204576/3 "2011-03-16T20:05:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![j\_k](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e9bcb4/32.png) [@j\_k](https://www.ruby-forum.com/u/j_k)\
**Post date:** [March 16, 2011, 9:43pm UTC](https://www.ruby-forum.com/t/rvm-1-9-2-gtk2/204576/4 "2011-03-16T21:43:00Z")

</div>

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”]

---

<div class="post-metadata">

**Author:** ![j\_k](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e9bcb4/32.png) [@j\_k](https://www.ruby-forum.com/u/j_k)\
**Post date:** [March 16, 2011, 8:28pm UTC](https://www.ruby-forum.com/t/rvm-1-9-2-gtk2/204576/5 "2011-03-16T20:28:10Z")

</div>

2011/3/16 J. K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> 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.
