please excuse me, i know this is probably a dumb question - but i’m
still pretty green on linux.
i downloaded ruby-gnome2-all-019.4.tar.gz, and in the readme i see:
== Install
% ruby extconf.rb
% make
% sudo make install
this seems easy enough, my question is (before i go and ruin
everything…) - what directory should i be in when i run these
commands? the file is now in the download directory, but that is
obviously not where i want the files to end up. truth is, i’m not sure
where i want the files to end up… can i just run these commands from
the download directory, or do i need to copy the file to another dir
first?
Are you using a very old version (0.19) ? You should use the latest.
Vincent C.
hi Vincent -
thanks for the step-by-step, i greatly appreciate it…
i’ve been using the version that came in the synaptic manager with
ubuntu 10.4 lucid, gnome2-ruby1.8 0.19.3-1ubuntu3. when i found .19.4
(while looking for the gstreamer MessageTag.parse patch,) i thought it
was the latest and greatest… sounds like i’m behind the times!
what’s the latest version? (for ruby 1.8.7[i486-linux], i haven’t made
the jump to 1.9 yet) - i’ll find it and see if i can install it
correctly.
ah, i checked out the link to the Zik player - turns out that i had
seen that way back when i started this thing - it served as inspiration
for diving into an audio player with ruby…
if you couldn’t tell by my posts, i’m a COMPLETE amateur coder - until
about a year ago i hadn’t done any programming since back with my
TI-994A, in basic. i saw ruby and thought it was cool (i was right…)
but i’m really pretty clueless. again i appreciate any and all help…
Are you using a very old version (0.19) ? You should use the latest.
Vincent C.
hi Vincent -
thanks for the step-by-step, i greatly appreciate it…
i’ve been using the version that came in the synaptic manager with
ubuntu 10.4 lucid, gnome2-ruby1.8 0.19.3-1ubuntu3. when i found .19.4
(while looking for the gstreamer MessageTag.parse patch,) i thought it
was the latest and greatest… sounds like i’m behind the times!
Not really, but you can find the 0.90 series.
what’s the latest version? (for ruby 1.8.7[i486-linux], i haven’t made
the jump to 1.9 yet) - i’ll find it and see if i can install it
correctly.
Just install ruby1.9.1 package! Then You will have 3 command
ruby (a link the default version of ruby)
ruby1.8
ruby 1.9.1 (1.9.2 version despite what it seems)
ah, i checked out the link to the Zik player - turns out that i had
seen that way back when i started this thing - it served as inspiration
for diving into an audio player with ruby…
if you couldn’t tell by my posts, i’m a COMPLETE amateur coder - until
about a year ago i hadn’t done any programming since back with my
TI-994A, in basic. i saw ruby and thought it was cool (i was right…)
but i’m really pretty clueless. again i appreciate any and all help…
I am also an amateur and I find ruby a very cool language.
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. Best Open Source Mac Front-Ends 2023
i’ll install the gtk.9 version and see how it goes… and it turns out
i do have ruby 1.9 installed (duh…) i just haven’t done anything with
it yet!
one more (dumb) question - i assume i should uninstall my current gtk
version before installing the new?
You should not uninstall Gtk+, gnome and other stuff are built on that.
You however want to install the ruby-gnome2 binding, which connects your
ruby program to the gnome2/gtk2 libs.
And I suggest use the gems, it’s a lot easier to maintain.
Try theese commands, for ruby 1.8, if they don’t work please send me
your solution:
If you install severals versions at the same time, you should
know/check which one is called.
Do you have read README file in tarball ? You have to install gtk2
dependancies (i.e. glib2, atk, pango, gdk_pixbuf…).
Something like :
ruby1.8 extconf.rb glib2 atk pango gdk_pixbuf
make
sudo make install
make distclean
ruby1.9.1 extconf.rb glib2 atk pango gdk_pixbuf
make
sudo make install
make distclean
The extconf command lines are given from memory (not a good omen at
this late hour), check with README.
so… i uninstalled ruby and everything along with it, and tried
fresh, making sure to install all the dependencies too. no dice, same
error. did it again, this time reinstalling the
gtk2 library that comes in the ubuntu repository. no sir, nothing.
same old same old.
maybe the gem version and the repository version are unhappy together,
and i haven’t been able to completely uninstall one or the other?
synaptic tells me that i’ve got gtk2 installed, but ruby doesn’t buy
it…
ugh. i just want gtk back - what the heck have i done? any
suggestions to save my sorry butt?
The error seems to be in glib/gtk bindings. Try to reinstall
ruby-gnome2 from the tarball. I guess it is the tarball installation
that populated /usr/local/lib/site_ruby. Check if
/usr/local/lib/site_ruby/1.8/glib2.rb is updated.
i did as you suggested, and got a bit further. now the error i’m
getting seems to be with atk:
ruby: symbol lookup error:
/usr/local/lib/site_ruby/1.8/i486-linux/atk.so: undefined symbol:
Init_atk_inits
the thing that confuses me is that i’ve tried completely uninstalling
ruby, then re-installing it with the setup that i had been using, and it
doesn’t work. i imagine that all of my fiddling has left some files
around that are causing problems. any ideas how i might undo the
tarball install? can i just delete the /usr/local/lib/site_ruby
directory after uninstalling and start from scratch?
i did as you suggested, and got a bit further. now the error i’m
getting seems to be with atk:
ruby: symbol lookup error:
/usr/local/lib/site_ruby/1.8/i486-linux/atk.so: undefined symbol:
Init_atk_inits
I recognize this error it is a bug fixed very recently in ruby-gnome2.
Delete the top directory of ruby-gnome2 source and re-untar the source
tarball before installation.
the thing that confuses me is that i’ve tried completely uninstalling
ruby, then re-installing it with the setup that i had been using, and it
doesn’t work. i imagine that all of my fiddling has left some files
around that are causing problems. any ideas how i might undo the
tarball install? can i just delete the /usr/local/lib/site_ruby
directory after uninstalling and start from scratch?
Only if you don’t need any of the files in /usr/local/lib/site_ruby.
It could be the solution but a dangerous one. Try reinstall from
fresh untarred sources.
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. Best Open Source Mac Front-Ends 2023
so i “successfully” installed gtk2-0.90.7 through the gem, but when i
checked the Gtk::BINDING_VERSION i was still showing 0.19.3 - i decided
to go ahead and install the 0.90.7 tarball, which seemed to all go
smoothly until i checked it…
I recognize this error it is a bug fixed very recently in ruby-gnome2.
Delete the top directory of ruby-gnome2 source and re-untar the source
tarball before installation.
Try reinstall from fresh untarred sources.
hi vince, thanks for all the help… want to make sure i do this
correctly - what exactly do you mean by:
"Delete the top directory of ruby-gnome2 source and re-untar the source
tarball before installation."?
when i download from sourceforge i don’t see a list of
directories/files to choose, the download starts automatically.
sorry again if this is a stupid question.
well, after many hours and headaches i managed to get myself back to
where i was: ruby 1.8.7 and gtk2 0.19.3 through the synaptic manager.
i followed your advice above, but the libraries were not targeted this
time in the extconf and the make failed. no freakin clue.
through all of this, i’ve installed rvm - and i’m planning on trying
the upgrade now on the version of ruby i’ve got through the rvm, so as
to not bork my system again!
i’ll let you know how that goes - can’t for the life of me understand
why it was so difficult for me to install, oh well. thanks again for
all the help.
-jk
p.s. going to switch over to Timeout rather than Thread for the
progress bar as per your advice in the other post. i know that Threads
can get messy, and that may be what’s causing some of my occasional
segmentation faults.
p.s. going to switch over to Timeout rather than Thread for the
progress bar as per your advice in the other post. i know that Threads
can get messy, and that may be what’s causing some of my occasional
segmentation faults.
I tried long and hard to get the progress bar to work with multiple
threads and kept getting strange problems as well. I ended up
partitioning my problem and putting it in the the GTK on_idle() loop.
Basically, I was parsing a file in the background. So instead
of using a thread I parsed 100 lines of the file at a time in
the on_idle() loop. In the end, not only did I get rid of my strange
problems, but I got much better interactivity as well because
GTK events are guaranteed to be handled after a set time
(which you can’t do using threads).
I’ve tried to champion this approach before, but people are
enamoured with threads I think the biggest problem that
people don’t realise is that Ruby threads are not native threads.
So you get all the disadvantages of using a thread and very
little advantage (as long at your problem is partitionable).
And since GTK threads are native threads you seem to run
into problems even if you work very hard to make sure the
GTK calls only happen in the GTK threads.
Better to ask than doing something ugly.
I mean delete the directory you have obtained by untarring the sources
tarball. Then untar the sources once again and reinstall ruby-gnome2.
–
Vincent C.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.