PDA

View Full Version : Can't seem to get Gtk working with Ruby



mostwanted
September 24th, 2005, 07:30 PM
Using Hoary, backports enabled.

I've installed the metapackage ruby-gnome2 as the official install guide says, but when I try to run an example script I get this error:


./gtk_stuff.rb:2:in `require': No such file to load -- gtk (LoadError)
from ./gtk_stuff.rb:2

Which is weird. Do I have to run it with something else than just ruby?

Roptaty
September 24th, 2005, 09:14 PM
Using Hoary, backports enabled.

I've installed the metapackage ruby-gnome2 as the official install guide says, but when I try to run an example script I get this error:


./gtk_stuff.rb:2:in `require': No such file to load -- gtk (LoadError)
from ./gtk_stuff.rb:2

Which is weird. Do I have to run it with something else than just ruby?
require 'gtk2'

mostwanted
September 24th, 2005, 09:33 PM
That seemed to do the trick though:

./gtk_stuff.rb:4: uninitialized constant Gtk::WINDOW_TOPLEVEL (NameError)

Roptaty
September 24th, 2005, 09:46 PM
Hmm, the gtk_stuff.rb file isnt by any chance a gtk1 example script, is it?