Help with Ruby/TK install on Mandriva2006

R

Randy Kramer

My Ruby install on Mandriva2006 (from, iirc, the Mandriva package(s)) appears
to be borked. One symptom: require 'tk' in irb returns "LoadError: No such
file to load -- tk ..."

Is anybody here using Ruby and TK successfully on Mandriva2006? If so, how
did you install it (RPMdrake?) and which packages did you have to install.

IIRC, I simply (during the Mandriva2006 install (not an update)) made sure
that Ruby was selected--I don't remember if there was one or more packages
related to Ruby.

I'm pretty sure I have TK installed (or at least TCL) because running either
tclsh or wish gives me a prompt (wish on a popup). However, looking
in /usr/lib/ruby/1.8/ I don't see a tk.rb package (I do see multi-tk.rb and
remote-tk.rb).

My goal is to use TkHTML in some Ruby programs, so after I get TK working I'll
want to download and get TkHTML working.

I'm wondering what my best way forward is, I can see a few options:

* uninstall Ruby (and related packages) and try reinstalling it (from
Mandriva2006 rpms) --I have a vague recollection that, during the
Mandriva2006 install, it couldn't find some packages or files--maybe some of
those were related to Ruby or TK, and maybe I need to download new copies of
the Ruby related files before trying to install.

* This machine used to run Mandrake 10 (or 10.1, I forget atm). Anyway, I
did install Ruby successfully, iirc, perhaps from source at that time, so, in
other places on my disk, I have some of the files I might need to make Ruby /
TK work. (For example, I have tk.rb in directory:

/rhk/work/ruby/ruby-1.8.2/ext/tk/lib/

I could try simply copying it (and maybe all files in that directory)
to /usr/lib/ruby/1.8/. (I might do that soon, just to see what happens, but
I thought I'd try asking for advice first--I don't want to make things worse,
but, on the other hand, if I decide to do a complete uninstall and reinstall,
this shouldn't hurt anything.

* the version of Ruby that comes with Mandrake2006 is 1.8.2--maybe I'd do
better to update to 1.8.4 by installing from source? (As mentioned above, I
managed that once, but I always regard a source installation as a hit or miss
proposition--I'm never confident that it will work, and if it doesn't, I'm
also left with no clue about how to proceed (sometimes I can tell that I'm
missing a "dependancy" and can identify what I need, sometimes I can't.

If it happens that I need Ruby 1.8.4 (or .3) to work with TkHTML, then I
definitely want to go that route (or find a binary RPM (for Ruby 1.8.4) for
Mandriva2006--I googled a few weeks ago and didn't find one).

* Maybe I have some of the Ruby paths set wrong (well, I didn't change
them--but maybe I could to pick up the tk.rb file in its current directory).

Any help appreciated!
Randy Kramer
 
H

Hidetoshi NAGAI

From: Randy Kramer <[email protected]>
Subject: Help with Ruby/TK install on Mandriva2006
Date: Wed, 22 Mar 2006 00:09:14 +0900
Message-ID: said:
My Ruby install on Mandriva2006 (from, iirc, the Mandriva package(s)) appears
to be borked. One symptom: require 'tk' in irb returns "LoadError: No such
file to load -- tk ..."

Although I don't know Mandriva2006, there may be another rpm package
about Ruby/Tk (e.g. ruby-tcltk-*.rpm).
 
J

Justin Collins

Hidetoshi said:
From: Randy Kramer <[email protected]>
Subject: Help with Ruby/TK install on Mandriva2006
Date: Wed, 22 Mar 2006 00:09:14 +0900


Although I don't know Mandriva2006, there may be another rpm package
about Ruby/Tk (e.g. ruby-tcltk-*.rpm).

I believe it is called ruby-tk. Try searching for it in mcc or rpmdrake
or using urpmi.
Also, I've never had any problems compiling Ruby on Mandriva, so you
might give that a shot if you want the newer version of Ruby.

-Justin
 
R

Randy Kramer

I believe it is called ruby-tk. Try searching for it in mcc or rpmdrake
or using urpmi.
Also, I've never had any problems compiling Ruby on Mandriva, so you
might give that a shot if you want the newer version of Ruby.

Thanks, Justin and Hidetoshi!

I compiled the 1.8.4 source and it seemed to work well. Now require 'tk'
works!

I do have two followup questions:

1. There were a lot of warnings during the install step, like:

zlib.c: In function 'gzfile_calc_crc':
zlib.c:2120: warning: pointer targets in passing argument 2 of 'crc32' differ
in signedness

Are these significant?

2. The irb command line works differently now than when Ruby 1.8.2 (the
Mandriva package) was installed. Some examples: up and down arrows don't
call up previous commands (i.e., command history), the left and right arrows
don't move the cursor. IIRC, this is back to the way irb behaved when I
installed Ruby 1.8.2 from source on Mandrake 10.1. Anybody know why the
difference, and how to get the other behavior back?

Aside: Perhaps the nicest behavior of all was that I could past multiple lines
of Ruby code at the irb prompt, and somehow, magically, each line was shown
with an irb prompt in front of it (very neat looking). That doesn't work
anymore, and it seems I must now paste in each line separately.

Randy Kramer
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top