From SnOwy - Ed's Wiki Notebook
Addendum
- Installed also on Pewter -- same error, excused OK.
- irb did not build or install correctly-- ruby already existed as installed by the OS framework :(
- moving ruby symbolic link in (usr/bin) to _ruby (came with the OS :(
- creating new symbolic link to the correct ruby (usr/local/bin)
Pewter
Pewter:bin eddiema$ mv ruby _ruby
mv: rename ruby to _ruby: Permission denied
Pewter:bin eddiema$ sudo move ruby _ruby
Password:
sudo: move: command not found
Pewter:bin eddiema$ sudo mv ruby _ruby
Pewter:bin eddiema$ sudo ln -s usr/local/bin/ruby ruby
Pewter:bin eddiema$ which ruby
/usr/local/bin/ruby
Pewter:bin eddiema$ ls -la | grep ruby
lrwxr-xr-x 1 root wheel 76 7 Feb 18:54 _ruby ->
../../System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby
lrwxr-xr-x 1 root wheel 18 16 Jun 10:45 ruby ->
usr/local/bin/ruby
Pewter:bin eddiema$ ruby --version
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-darwin10.3.0]
Pewter:bin eddiema$ irb --version
irb 0.9.5(05/04/13)
Pewter:bin eddiema$ ls -la | grep irb
lrwxr-xr-x 1 root wheel 75 7 Feb 18:54 irb ->
../../System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/irb
Pewter:bin eddiema$ sudo mv irb _irb
Pewter:bin eddiema$ ls -la | grep rdoc
-r-xr-xr-x 1 root wheel 71588 18 May 2009 gatherheaderdoc
-r-xr-xr-x 1 root wheel 115720 18 May 2009 headerdoc2html
lrwxr-xr-x 1 root wheel 76 7 Feb 18:54 rdoc ->
../../System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/rdoc
Pewter:bin eddiema$ sudo mv rdoc _rdoc
Pewter:bin eddiema$ sudo ln -s usr/local/bin/irb irb
Pewter:bin eddiema$ sudo ln -s usr/local/bin/rdoc rdoc
Pewter:bin eddiema$ irb --version
-bash: /usr/bin/irb: No such file or directory
Pewter:bin eddiema$ which irb
/usr/local/bin/irb
Pewter:bin eddiema$ irb --version
-bash: /usr/bin/irb: No such file or directory
Pewter:bin eddiema$ ./irb --version
-bash: ./irb: No such file or directory
Pewter:bin eddiema$ sudo ln -s /usr/local/bin/irb irb
ln: irb: File exists
Pewter:bin eddiema$ sudo rm irb
Pewter:bin eddiema$ sudo rm rdoc
Pewter:bin eddiema$ sudo ln -s /usr/local/bin/irb irb
Pewter:bin eddiema$ sudo ln -s /usr/local/bin/rdoc rdoc
Pewter:bin eddiema$ irb --version
irb 0.9.5(05/04/13)
Pewter:bin eddiema$ rdoc --version
rdoc 2.2.2
Pewter:bin eddiema$
Conclusion
- DO NOT USE: io/nonblock -then- r, w = IO.pipe -then- n.nonblock = false until we understand the problem better
- conjecture: this *might* be normal behaviour-- look, the pipe gets filled with 105 'a', then 2(4096) more characters what if the pipe is not bigger than 105 bytes?
- is the test just flawed?
Installation
- built from source ruby-1.9.1-p378.tar.gz
- ./configure
- make
- make test -- see below for the sole failed test (that was later commented out)
- sudo make install
Tin:ruby-1.9.1-p378 eddiema$ which irb
/usr/local/bin/irb
Tin:ruby-1.9.1-p378 eddiema$ which ruby
/usr/local/bin/ruby
Tin:ruby-1.9.1-p378 eddiema$ irb --version
irb 0.9.5(05/04/13)
Tin:ruby-1.9.1-p378 eddiema$ ruby --version
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-darwin10.3.0]
Tin:ruby-1.9.1-p378 eddiema$
Failed unit test after compiling
- for make test
- Commented out this test /Users/eddiema/Documents/ThePlace/ruby-1.9.1-p378/bootstraptest/test_io.rb
- line 11 onward -- tried changing the amount of time to wait from 10 seconds to 60 seconds-- still failed!
- note if I ever have a hang during unblocked writing to a pipe, this will be the culprit.
- Google search did not help finding a solution to this problem (only acknowledged that a problem exists)
#228 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]
FAIL 1/945 tests failed
make: *** [btest-ruby] Error 1