The linux systems I admin @ work have an old version of ruby (1.8.2).
I've decided to attempt an upgrade. (SuSE 9.1 fwiw.)
First attempt was with Ruby 1.9.0-1. Everything seemed to work fine,
even got a recent build of OCI8 to work, and my oracle connection
scripts were golden. Then I tried another group of scripts with less
favorable results. Apparently 'ping' isn't in the std lib anymore? It
wasn't immediately clear to me that net-ping-1.22 would be a drop in
replacement, so I punted on 1.9.
Next in line was 1.8.6-p114. Also went smoothly through build. Tried to
run a few scripts... nope. Error on 'socket'? huh?
irb(main):001:0> require 'socket'
LoadError: no such file to load -- socket
from (irb):1:in `require'
from (irb):1
I see in the console from 'make' that socket was built cleanly. And it's
in the lib directory:
lib/ruby/1.8/i686-linux/socket.so
Been using ruby for some time now and feel like a noobie all of a sudden
by not being able to get either of these builds working. Both builds
were done with "./configure; make; sudo make install". Nothing special.
Any tips welcome. My scripts are monitoring oriented, making liberal use
of ping, socket, OCI8, gserve, thread and timeout. (If any of that makes
a difference.)
It may be a path issue. "strace" in a shell is your friend. Run
"strace ruby yourscript.rb 2>&1 | grep socket | more". It'll how you
what files/directories your new Ruby interpreter actually tries
loading the socket extension from. (strace shows you what system calls
your app calls - it's very flexible, and well worth learning how to
use)
Vidar
···
On Apr 9, 1:25 am, Jon Rust <wonderdog+rt...@gmail.com> wrote:
irb(main):001:0> require 'socket'
LoadError: no such file to load -- socket
from (irb):1:in `require'
from (irb):1
I see in the console from 'make' that socket was built cleanly. And it's
in the lib directory: