Problem with Ruby 1.8.1 on FreeBSD 3.2

P

ppi

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
from /usr/local/lib/ruby/1.8/net/protocol.rb:21:in `require'
from /usr/local/lib/ruby/1.8/net/protocol.rb:21
from /usr/local/lib/ruby/1.8/net/smtp.rb:121:in `require'
from /usr/local/lib/ruby/1.8/net/smtp.rb:121
from (irb):6:in `require'
from (irb):6

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

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?

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.)

Mark Lindsay
 
R

Rasputin

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.
 
P

ppi

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'll try this when I have a little more time.
I hear 1.8.1 is a lot faster
(I'm on NetBSD now and theres no 1.8 package yet).

Actually, my current speed criteria is how does Ruby/mod_ruby/eruby
compare to PHP 4.x in terms of speed?

As long as the speed is comparable (or faster), I'm happy with it until
I can upgrade the OS.

(I'm currently using PHP for dynamic content and web apps and have
decided to switch to Ruby, hence the comparison.)
To be honest though, if speed matters, upgrade your OS.
FreeBSD 4+ is the fastest OS I've ever run.

I was hoping to wait for FreeBSD 5.3 (the first 5.x to be officially
deemed okay for production servers) for my upgrade, but the hard drive
is filling up fast.

Mark Lindsay
 

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,774
Messages
2,569,596
Members
45,143
Latest member
DewittMill
Top