Problem with installing Ruby GTK

Discussion in 'Ruby' started by Karthikeyan A k, Feb 21, 2011.

  1. Hello People,

    I tried to install Ruby GTK using the following command on my Ubuntu:

    $ sudo gem install gtk2

    and it spits out some error as shown:

    Building native extensions. This could take a while...
    ERROR: Error installing gtk2:
    ERROR: Failed to build gem native extension.

    /usr/local/ruby/bin/ruby extconf.rb
    checking for GCC... yes
    checking for rb_define_alloc_func() in ruby.h... yes
    checking for rb_block_proc() in ruby.h... yes
    checking for new allocation framework... yes
    checking for attribute assignment... no
    checking for Win32 OS... no
    checking for gobject-2.0... no

    How to fix it?

    --
    Posted via http://www.ruby-forum.com/.
     
    Karthikeyan A k, Feb 21, 2011
    #1
    1. Advertising

  2. Karthikeyan A k

    pp Guest

    [Note: parts of this message were removed to make it a legal post.]


    Hi, you might need some extra libraries to build this gem, gobject-2.0 for example.extconf.rb have not found gobject-2.0.
    install all dependencies and try again

    > Date: Mon, 21 Feb 2011 11:43:24 +0900
    > From:
    > Subject: Problem with installing Ruby GTK
    > To:
    >
    > Hello People,
    >
    > I tried to install Ruby GTK using the following command on my Ubuntu:
    >
    > $ sudo gem install gtk2
    >
    > and it spits out some error as shown:
    >
    > Building native extensions. This could take a while...
    > ERROR: Error installing gtk2:
    > ERROR: Failed to build gem native extension.
    >
    > /usr/local/ruby/bin/ruby extconf.rb
    > checking for GCC... yes
    > checking for rb_define_alloc_func() in ruby.h... yes
    > checking for rb_block_proc() in ruby.h... yes
    > checking for new allocation framework... yes
    > checking for attribute assignment... no
    > checking for Win32 OS... no
    > checking for gobject-2.0... no
    >
    > How to fix it?
    >
    > --
    > Posted via http://www.ruby-forum.com/.
    >
     
    pp, Feb 21, 2011
    #2
    1. Advertising

  3. Karthikeyan A k

    Adde Guest

    Hi.
    It's probably missing the Ubuntu GTK2 developer packages.

    /Adde

    On 2011-02-21 08:24, pp wrote:
    > Hi, you might need some extra libraries to build this gem, gobject-2.0 for example.extconf.rb have not found gobject-2.0.
    > install all dependencies and try again
    >
    >> Date: Mon, 21 Feb 2011 11:43:24 +0900
    >> From:
    >> Subject: Problem with installing Ruby GTK
    >> To:
    >>
    >> Hello People,
    >>
    >> I tried to install Ruby GTK using the following command on my Ubuntu:
    >>
    >> $ sudo gem install gtk2
    >>
    >> and it spits out some error as shown:
    >>
    >> Building native extensions. This could take a while...
    >> ERROR: Error installing gtk2:
    >> ERROR: Failed to build gem native extension.
    >>
    >> /usr/local/ruby/bin/ruby extconf.rb
    >> checking for GCC... yes
    >> checking for rb_define_alloc_func() in ruby.h... yes
    >> checking for rb_block_proc() in ruby.h... yes
    >> checking for new allocation framework... yes
    >> checking for attribute assignment... no
    >> checking for Win32 OS... no
    >> checking for gobject-2.0... no
    >>
    >> How to fix it?
    >>
    >> --
    >> Posted via http://www.ruby-forum.com/.
    >>

    >
     
    Adde, Feb 21, 2011
    #3
  4. Karthikeyan A k

    Kouhei Sutou Guest

    Hi,

    In <>
    "Problem with installing Ruby GTK" on Mon, 21 Feb 2011 11:43:24 +0900,
    Karthikeyan A k <> wrote:

    > I tried to install Ruby GTK using the following command on my Ubuntu:
    >
    > $ sudo gem install gtk2
    >
    > and it spits out some error as shown:
    >
    > Building native extensions. This could take a while...
    > ERROR: Error installing gtk2:
    > ERROR: Failed to build gem native extension.
    >
    > /usr/local/ruby/bin/ruby extconf.rb
    > checking for GCC... yes
    > checking for rb_define_alloc_func() in ruby.h... yes
    > checking for rb_block_proc() in ruby.h... yes
    > checking for new allocation framework... yes
    > checking for attribute assignment... no
    > checking for Win32 OS... no
    > checking for gobject-2.0... no
    >
    > How to fix it?


    Try the following command:

    % sudo aptitude install -y libgtk2.0-dev
    % sudo gem install gtk2


    Thanks,
    --
    kou
     
    Kouhei Sutou, Feb 21, 2011
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    544
  2. David Espada
    Replies:
    2
    Views:
    135
    David Espada
    Apr 28, 2004
  3. Gergely Kontra
    Replies:
    2
    Views:
    271
    Joao Pedrosa
    Jun 18, 2004
  4. Pafo007
    Replies:
    5
    Views:
    204
  5. Alex Shulgin
    Replies:
    1
    Views:
    194
    thefed
    Nov 21, 2007
Loading...

Share This Page