ppi / amug.org wrote:
> I installed Ruby 1.8.1 from source on FreeBSD 3.2.
> 
> No compile errors.  Ruby and irb seem to work fine.
> 
> Except, when I use require 'net/smtp' I get this error:
> 
> irb(main):006:0* require 'net/smtp'
> LoadError: No such file to load -- socket


My guess is the stock ruby configure script misdetects something and
so fails to build you a socket library.

> I also installed Ruby 1.8.1 on FreeBSD 4.9 (from the port system), but the
> same require statement works without error.

If you cant get ports on your older box, have a lot at the patches in 
the ruby18 port directory - you might be able to apply them manually
(though I'm not sure that will help on a 3.2 box - the TCP stack has
probably been rewritten since then).


> I then installed Ruby 1.6 on the FreeBSD 3.2 machine.  The require
> 'net/smtp' statement worked fine!
> 
> Any suggestions as to how to get 1.8.1 working on FreeBSD 3.2?

Have you tried the FreeBSD lists? They're usually helpful
[although expect a few responses along the lines of 'upgrade' :) ]

> 
> On the other hand, I could just use 1.6 on that machine.  This raises
> the question: what is the performance speed difference between 1.6 and
> 1.8.1?  (I will be using mod_ruby, so speed is a factor for me.)

I hear 1.8.1 is a lot faster
(I'm on NetBSD now and theres no 1.8 package yet).


  To be honest though, if speed matters, upgrade your OS.
  FreeBSD 4+ is the fastest OS I've ever run.


-- 
Rasputin :: Jack of All Trades - Master of Nuns