Forum: Ruby-Gnome 2 rvm 1.9.2 & gtk2

7f28f9db46bfe8e9b8b5fcd90b2f1302?d=identicon&s=25 J. K. (j_k)
on 2011-03-16 03:04
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
C4a836af7263f84a4f7cc91ed6f3ae77?d=identicon&s=25 Vincent Carmona (vinc-mai)
on 2011-03-16 18:41
(Received via mailing list)
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. <ruby-forum-incoming@andreas-s.net>:
> 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-...
>



--
Vincent Carmona
7f28f9db46bfe8e9b8b5fcd90b2f1302?d=identicon&s=25 J. K. (j_k)
on 2011-03-16 20:05
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
C4a836af7263f84a4f7cc91ed6f3ae77?d=identicon&s=25 Vincent Carmona (vinc-mai)
on 2011-03-16 20:28
(Received via mailing list)
2011/3/16 J. K. <ruby-forum-incoming@andreas-s.net>:
> 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 Carmona
7f28f9db46bfe8e9b8b5fcd90b2f1302?d=identicon&s=25 J. K. (j_k)
on 2011-03-16 21:43
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"]
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.