Results 1 to 4 of 4

Thread: Can't seem to get Gtk working with Ruby

  1. #1
    Join Date
    Mar 2005
    Location
    Ålsgårde, Denmark
    Beans
    939
    Distro
    Ubuntu 7.04 Feisty Fawn

    Can't seem to get Gtk working with Ruby

    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:

    Code:
    ./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?

  2. #2
    Join Date
    Dec 2004
    Location
    Oslo, Norway
    Beans
    67
    Distro
    Kubuntu 8.04 Hardy Heron

    Re: Can't seem to get Gtk working with Ruby

    Quote Originally Posted by mostwanted
    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:

    Code:
    ./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'

  3. #3
    Join Date
    Mar 2005
    Location
    Ålsgårde, Denmark
    Beans
    939
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: Can't seem to get Gtk working with Ruby

    That seemed to do the trick though:

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

  4. #4
    Join Date
    Dec 2004
    Location
    Oslo, Norway
    Beans
    67
    Distro
    Kubuntu 8.04 Hardy Heron

    Re: Can't seem to get Gtk working with Ruby

    Hmm, the gtk_stuff.rb file isnt by any chance a gtk1 example script, is it?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •