LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Ruby-GTK2 (http://www.linuxquestions.org/questions/slackware-14/ruby-gtk2-4175485437/)

narz 11-21-2013 06:50 PM

Ruby-GTK2
 
Hi is anyone able to build any version of ruby-gtk2? When I run ruby extconf.rb, it complains about missing headers during the build process. The slackbuild from 14.0 has a problem with glib. If anyone can tell me how to build this thing, that would be awesome.

Thanks

dugan 11-21-2013 07:19 PM

I just used the SlackBuild to build ruby-gtk2 2.0.2

First, I had to install the pkg-config gem.

Use the rubygem-pkg-config SlackBuild. Or, if you don't feel like it:

Code:

su -
gem install pkg-config

Then I bumped the version in the ruby-gtk2 SlackBuild, removed ChangeLog from its list of documentation to install, and ran it.

andrewthomas 11-21-2013 07:24 PM

This may help you a bit.
Code:

[ebuild  N    ] dev-ruby/pkg-config-1.1.4-r1  USE="{-test}" RUBY_TARGETS="ruby18 ruby19" 18 kB
[ebuild  N    ] dev-ruby/ruby-glib2-1.2.6  USE="{-test}" RUBY_TARGETS="ruby18 ruby19 (-ree18)" 1,679 kB
[ebuild  N    ] dev-ruby/ruby-atk-1.2.6  USE="{-test}" RUBY_TARGETS="ruby18 ruby19 (-ree18)" 0 kB
[ebuild  N    ] dev-ruby/ruby-gdkpixbuf2-1.2.6  USE="{-test}" RUBY_TARGETS="ruby18 ruby19 (-ree18)" 0 kB
[ebuild  N    ] dev-ruby/ruby-gio2-1.2.6  USE="{-test}" RUBY_TARGETS="ruby18 ruby19 (-ree18)" 0 kB
[ebuild  N    ] dev-ruby/rcairo-1.12.6  USE="-doc {-test}" RUBY_TARGETS="ruby18 ruby19" 93 kB
[ebuild  N    ] dev-ruby/ruby-pango-1.2.6  USE="{-test}" RUBY_TARGETS="ruby18 ruby19 (-ree18)" 0 kB
[ebuild  N    ] dev-ruby/ruby-gtk2-1.2.6  USE="{-test}" RUBY_TARGETS="ruby18 ruby19 (-ree18)" 0 kB


narz 11-21-2013 07:38 PM

Quote:

Originally Posted by dugan (Post 5068638)
I just used the SlackBuild to build ruby-gtk2 2.0.2

First, I had to install the pkg-config gem:

Code:

su -
gem install pkg-config

(The SlackBuild for rubygem-pkg-config doesn't work on 14.1).

Then I bumped the version and removed ChangeLog from the list of documentation to install, and ran the SlackBuild.

Ok thanks. I'll try installing ruby pkg-config when I get home.

dugan 11-21-2013 07:41 PM

Quote:

Originally Posted by narz (Post 5068650)
Ok thanks. I'll try installing ruby pkg-config when I get home.

I updated my post when you were replying. The ruby-pkg-config SlackBuild does indeed work with Slackware 14.1. It's just that right-clicking on the source in the SlackBuilds.org page, pasting it into a terminal, and downloading it with curl caused it to download as an error page. Downloading the source by clicking it works.

narz 11-21-2013 07:52 PM

Ok gotcha

narz 11-25-2013 07:27 PM

I did a gem install of ruby-gtk2 and it looked like it went ok, though I only wanted it so I could use the eatmonkey download manager for xfce. http://goodies.xfce.org/projects/applications/eatmonkey

I have aria2 installed with all the dependencies I need, I think, but it doesn't work, it doesn't even start up or give me errors. Has anyone used eatmonkey or knows how to get it to work?

dugan 11-25-2013 08:43 PM

I personally have not used Eatmonkey. I only use Ruby-GTK2 to get RubyRipper to work.

narz 11-26-2013 06:59 AM

Ok so I wasted way too much time trying to get eatmonkey to work, probably not gonna waste anymore. First I realized the bin executable is actually just a script that points to ruby files in /usr/local/share/eatmonkey. So I changed the script so it points at /usr/share where I installed it, problem now is I just get ruby LoadErrors.

/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- eataria2 (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from ./eat.rb:6:in `<main>'

If anyone ever gets this working, please post back. Too much of a headache for me and I'm out of my depth.

EDIT: FML I finally figured it out. In ruby versions >=1.9.2 (I think), you have to replace the "require" methods with "require_relative" for things that ruby doesn't expect in its lib path. It's like a security issue or something. I don't know that much about this since I just read about it, but when I changed some of the "require" methods I got the gui working. It doesn't error out anymore. Hope this helped if anyone wanted to use this.


All times are GMT -5. The time now is 01:14 PM.