Ruby and glade/gtk+

Hi, well i’m going to explain my problem.


I’m a windows user, but i want to program on ruby 1.9, there wasn’t a
msi installer so i downloaded the binaries (Ruby 1.9.1-p129-i386 Binary)
and put it on “C:”, then i modified the path variable to the ruby/bin
directory; then i tried a “hello world” with scite, pressed f5 and it
works! :smiley: (just like php).


Then i donwloaded the msi installer for glade 3.6.7 and gtk+ both came
in one msi installer, no need to correct path variable i guess, then i
install it on “C:”, i want this versions because i’ve heard that
libglade is deprecated, now gtkbuilder rules, well, glade runs ok.


i don’t know what is missing, because i tried some code from internet
calling a simple window and returns this error:

in `require’: no such file to load – Gtk (LoadError)

this is the code:

require ‘Gtk’

window =
button =“Hello World”)

window.set_title(“Hello Ruby”)

Connect the button to a callback.

button.signal_connect(‘clicked’) { puts “Hello Ruby” }

Connect the signals ‘delete_event’ and ‘destroy’

window.signal_connect(‘delete_event’) {
puts “delete_event received”
window.signal_connect(‘destroy’) {
puts “destroy event received”

window.add button

Please help, thank you

Subject: [ruby-gnome2-devel-en] ruby and glade/gtk+
Date: sab 01 mag 10 01:28:51 +0200

Quoting Rodrigo Durá ([email protected]):

require ‘Gtk’
I am not a windows user, but in my linux code I have to write

require ‘gtk2’

(note the lowercase g and the 2 at end)

I believe this should be the case for windows, too.



  •     Se la Strada e la sua Virtu' non fossero state messe da 


  • K * Carlo E. Prelz - [email protected] che bisogno ci
    •           di parlare tanto di amore e di rettitudine?