Building Ruby on Linux

I have been using Ruby on a Windows platform for a while, but now I want to
move by stuff to a Linux box. I got the source for Ruby 1.6.7 and built it
following the provided README file. The “make test” ran fine. And if I do
"ruby -v", I get version 1.6.7. Yippy!!

The problem comes in with trying to do anything beyond the basics. I can’t
get “irb” to work. I give me a nasty:

 /usr/local/bin/irb:10:in    'require': No such file to load -- irb

(LoadError) from /usr/local/bin/irb:10

Anytime I try and use “require ‘tk’”, I get the same type of error.

I want to end up using “fxruby”, but for right now, I would like “irb” and
"tk" to work. Any words of wisdom would be appreciated.

–Dale

Hi Dale,

In article <20C86D2620F6D411A199009005DC0102015C63A1@exchange_serve.multitech.prv>,
Dale Martenson dmartenson@multitech.com writes:

 /usr/local/bin/irb:10:in    'require': No such file to load -- irb

(LoadError) from /usr/local/bin/irb:10
First check if you have any libtk[version-number].so
’locate libtk’ should do the trick.
If it is inside any system lib directory, (as i think it will be) check,
whether the directory has an entry in /etc/ld.so.conf.
Then try ‘ldconfig -a’ as root.

Then go to the ruby main directory (where ruby is installed, not where
the source is).
I assume this will be /usr/local/lib/ruby/1.6.7/[machine]/…
and do a
find . -name ‘*.so’ -print

Either add the (full-path!)directories showing up to /etc/ld.so.conf,
too and invoke ‘ldconfig -a’ or add the directories to the environment
variable LD_LIBRARY_PATH:

In sh like shells (like bash) this is done by
LD_LIBRARY_PATH=/path/to/the/additional/.sofiles:/path/to/other/sos
export LD_LIBRARY_PATH
(put this into .bashrc or .profile)

In csh like shells use
setenv LD_LIBRARY_PATH /path/to/the/additional/.sofiles:/path/to/other/sos
instead.

After that, it should work - at least i hope so :wink:

Regards
Martin.

···


The early bird catches the worm. If you want something else for
breakfast, get up later.