Installing Ruby and the ext/Setup file

Hello,

I just finished installing Ruby 1.9.1 on Mac OS 10.5.6 and I have a
few questions. There are probably some basics I'm missing here. This
is the first time I've had to install Ruby since 1.8.6 came pre-
installed, so perhaps this is part of the normal setup, but I wouldn't
know. Thanks for helping me out!

Question 1:
At first I just did a basic install running ./configure, make, make
test, sudo make install. ruby -v returns 1.9.1, and 'which ruby'
points to the correct location. My path is set up to find it. But when
I ran ri to test things, I got a require File Not Found error for
stringio. I went back and modified the ext/Setup file and removed the
# before stringio. I'm puzzled as to why stringio is found when
directly linked but not dynamically.

It did fix the file not found error at any rate. I had to repeat the
procedure with syck as well. At the end of a few make, make install
sequences, I was able to run ri with no errors.

Now I'm kind of unsettled by having to modify the ext/Setup file. As
far as I know, I haven't changed anything about stringio or syck that
would make them non-standard. Have I got something set up in a strange
way that ruby wouldn't be able to build correctly the first time? I'm
worried this file not found error will crop up in the future as I try
to require different things. I'm hoping I can get some direction to
learn more about stringio and syck and why I needed to link them
directly. Is it a quirk of my system, or just something I don't
understand fully.

Question 2:
Even after the above is complete, 'make test' gave me 1 error on
test_io.rb:

#223 test_io.rb:11:in `<top (required)>':
     begin
       require "io/nonblock"
       r, w = IO.pipe
       w.nonblock = true
       w.write_nonblock("a" * 100000)
       w.nonblock = false
       t1 = Thread.new { w.write("b" * 4096) }
       t2 = Thread.new { w.write("c" * 4096) }
       sleep 0.5
       r.sysread(4096).length
       sleep 0.5
       r.sysread(4096).length
       t1.join
       t2.join
     rescue LoadError
     end
  #=> not finished in 10 seconds [ruby-dev:32566]

I'm not sure what this error means, or how severe it is. Something
timed out (I guess), but I'm not really clear what. I'm also not sure
if I need to address it because the install seems to be working.

I had the exact same sort of problems and had to completely uninstall to get back to the stable 1.8.6

Is anyone looking at this obvious problem for MacOSX?

Doesn't instill a lot of confidence.

···

Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: Awv <aaron.vanderpoel@gmail.com>

Date: Tue, 31 Mar 2009 12:49:53
To: ruby-talk ML<ruby-talk@ruby-lang.org>
Subject: Installing Ruby and the ext/Setup file.

Hello,

I just finished installing Ruby 1.9.1 on Mac OS 10.5.6 and I have a
few questions. There are probably some basics I'm missing here. This
is the first time I've had to install Ruby since 1.8.6 came pre-
installed, so perhaps this is part of the normal setup, but I wouldn't
know. Thanks for helping me out!

Question 1:
At first I just did a basic install running ./configure, make, make
test, sudo make install. ruby -v returns 1.9.1, and 'which ruby'
points to the correct location. My path is set up to find it. But when
I ran ri to test things, I got a require File Not Found error for
stringio. I went back and modified the ext/Setup file and removed the
# before stringio. I'm puzzled as to why stringio is found when
directly linked but not dynamically.

It did fix the file not found error at any rate. I had to repeat the
procedure with syck as well. At the end of a few make, make install
sequences, I was able to run ri with no errors.

Now I'm kind of unsettled by having to modify the ext/Setup file. As
far as I know, I haven't changed anything about stringio or syck that
would make them non-standard. Have I got something set up in a strange
way that ruby wouldn't be able to build correctly the first time? I'm
worried this file not found error will crop up in the future as I try
to require different things. I'm hoping I can get some direction to
learn more about stringio and syck and why I needed to link them
directly. Is it a quirk of my system, or just something I don't
understand fully.

Question 2:
Even after the above is complete, 'make test' gave me 1 error on
test_io.rb:

#223 test_io.rb:11:in `<top (required)>':
     begin
       require "io/nonblock"
       r, w = IO.pipe
       w.nonblock = true
       w.write_nonblock("a" * 100000)
       w.nonblock = false
       t1 = Thread.new { w.write("b" * 4096) }
       t2 = Thread.new { w.write("c" * 4096) }
       sleep 0.5
       r.sysread(4096).length
       sleep 0.5
       r.sysread(4096).length
       t1.join
       t2.join
     rescue LoadError
     end
  #=> not finished in 10 seconds [ruby-dev:32566]

I'm not sure what this error means, or how severe it is. Something
timed out (I guess), but I'm not really clear what. I'm also not sure
if I need to address it because the install seems to be working.