Installer packages for MacOSX

Hi, all

I just posted some binary installer packages for Ruby 1.8.1 (stable
snapshot) and 1.9.0 (development snapshot), for installing on MacOSX.
They both are configured for use with the TclTkAqua libraries, and will
install full ri documentation. You can get them at:

http://homepage.mac.com/discord/Ruby

I welcome your thoughts :slight_smile:

ā€“Mark

In article 05A13C70-7863-11D8-B9F8-000502FDD5CC@mac.com,

Ā·Ā·Ā·

Mark Hubbart discord@mac.com wrote:

Hi, all

I just posted some binary installer packages for Ruby 1.8.1 (stable
snapshot) and 1.9.0 (development snapshot), for installing on MacOSX.
They both are configured for use with the TclTkAqua libraries, and will
install full ri documentation. You can get them at:

http://homepage.mac.com/discord/Ruby

I welcome your thoughts :slight_smile:

That sounds great. Can you choose alternate installation locations?

Iā€™ll give this a try when I get home.

ā€¦Iā€™m using Ruby on all of the three major platforms these days: Linux &
'doze by day and OS X by night :wink:

Phil

Quoteing discord@mac.com, on Thu, Mar 18, 2004 at 07:32:55AM +0900:

I just posted some binary installer packages for Ruby 1.8.1 (stable
snapshot) and 1.9.0 (development snapshot), for installing on MacOSX.
They both are configured for use with the TclTkAqua libraries, and will
install full ri documentation. You can get them at:

http://homepage.mac.com/discord/Ruby

I welcome your thoughts :slight_smile:

Hi Mark!

My thoughts:

1 - Iā€™ve been meaning to build 1.8 for ages, but havenā€™t because Iā€™m
lazy, and Iā€™d rather be working on my ruby projects. Now that you did
this, I have ruby1.8 locally. So, its useful.

2 - great that the samples and ri docs are there!

3 - it doesnā€™t have ruby/cocoa or ruby/aeosa, which I think are pretty
important for a ruby/os-x system

4 - the installer doesnā€™t say where itā€™s going to go (/usr/local/). I
would never have installed it if I hadnā€™t read one of the posters say
it goes there, the thought of it trashing or intermingling with my
1.6-as-shipped-by-apple version is too horrible to contemplate. A note
would be very reassuring to the wary!

5 - if you could manage itā€¦ it would be very useful to be able to
change the install location. It wonā€™t RUN from a different location, but
I would be able to install it to, say, /usr/local/stow/ruby18/ā€¦ then
run stow to create symlinks so that ruby THINKS itā€™s in /usr/local. That
would mean I could then uninstall it when I want to with a single
command.

6 - it has dependencies on your local system:

$ /usr/local/bin/irb
dyld: ruby canā€™t open library: /supp/lib/libreadline.4.3.dylib (No such file or directory, errno = 2)
Trace/BPT trap

I tried this first, because I wanted to know if it had readline support.
I think you linked against a libreadline youā€™ve installed locally, but I
think you could link against the systems readline framework, how to do
so is described here:

http://cherryville.org/8896/ruby_readline_for_mac.html

I used his precompiled bundle, and now irb as-shipped has a history.
Yeah!

(Iā€™m using osx 10.2, btw)

7 - I would think it is really, really cool if you could get whatever
kind of script/project that you used into the ruby 1.8 cvs tree, so that
any os/x developer who checked out the cvs tree could build a .dmg like
you did, without having to figure it out themselves, because youā€™d
already done the hard workā€¦

and thanks for doing the hard work, btw!

Cheers,
Sam

1 - Iā€™ve been meaning to build 1.8 for ages, but havenā€™t because Iā€™m
lazy, and Iā€™d rather be working on my ruby projects. Now that you did
this, I have ruby1.8 locally. So, its useful.

2 - great that the samples and ri docs are there!

3 - it doesnā€™t have ruby/cocoa or ruby/aeosa, which I think are pretty
important for a ruby/os-x system

Iā€™ve tried to get rubycocoa it to compile and work properlyā€¦ but with
no luck. I think perhaps it needs updating to work with panther. If I
could get it working properly, I would include it as an optional
install in the package.

4 - the installer doesnā€™t say where itā€™s going to go (/usr/local/). I
would never have installed it if I hadnā€™t read one of the posters say
it goes there, the thought of it trashing or intermingling with my
1.6-as-shipped-by-apple version is too horrible to contemplate. A note
would be very reassuring to the wary!

Iā€™ll make sure to fix that.

5 - if you could manage itā€¦ it would be very useful to be able to
change the install location. It wonā€™t RUN from a different location,
but
I would be able to install it to, say, /usr/local/stow/ruby18/ā€¦ then
run stow to create symlinks so that ruby THINKS itā€™s in /usr/local.
That
would mean I could then uninstall it when I want to with a single
command.

I believe there is an option in the installer that lets the user choose
the installation folder. Iā€™ll check that out.
However, when installing from a package, Installer leaves a receipt,
which contains references to all the files that were added to your
system by that install. It should be simple to put together a uninstall
script based on the receiptā€¦ Iā€™ll need to look into it though.

6 - it has dependencies on your local system:

$ /usr/local/bin/irb
dyld: ruby canā€™t open library: /supp/lib/libreadline.4.3.dylib (No
such file or directory, errno = 2)
Trace/BPT trap

Whoops! :confused: I guess thatā€™ll need to be fixed. Obviously, Iā€™m not very
experienced at thisā€¦

I tried this first, because I wanted to know if it had readline
support.
I think you linked against a libreadline youā€™ve installed locally, but
I
think you could link against the systems readline framework, how to do
so is described here:

http://cherryville.org/8896/ruby_readline_for_mac.html

I used his precompiled bundle, and now irb as-shipped has a history.
Yeah!

I seem to remember using this once beforeā€¦ Iā€™ll check it out.

(Iā€™m using osx 10.2, btw)

7 - I would think it is really, really cool if you could get whatever
kind of script/project that you used into the ruby 1.8 cvs tree, so
that
any os/x developer who checked out the cvs tree could build a .dmg like
you did, without having to figure it out themselves, because youā€™d
already done the hard workā€¦

This was mostly manual :slight_smile: After patching, I compiled it, moved
/usr/local to /usr/local.real, installed, and copied the installation
tree over. But it should be possible to write a script that would do
this a little more cleanlyā€¦ Perhaps by editing the makefile to add
another installation option, which copies the files an installation
archive.

I would really like it if the patches that let tcltklib compile on
macs would be added to the cvs. They donā€™t affect other installations,
so it shouldnā€™t break anything, I would think, just fix it.

Iā€™ll try to fix things up a little, and get them looking a little
better. Weā€™ll see how it goes. :slight_smile: Thanks for the feedback!!

ā€“Mark

Ā·Ā·Ā·

On Mar 17, 2004, at 6:07 PM, Sam Roberts wrote:

and thanks for doing the hard work, btw!

Cheers,
Sam

This explains the problem. OSX 10.3, it appears, ships with a working
libreadline.4.3 stuffed in /usr/lib, which is what my readline.bundle
was compiled against. Iā€™ll see if thereā€™s a way to fix this to work
automatically with 10.2, but it may need to be an optional package in
the installer.

Ā·Ā·Ā·

On Mar 17, 2004, at 6:07 PM, Sam Roberts wrote:

6 - it has dependencies on your local system:

$ /usr/local/bin/irb
dyld: ruby canā€™t open library: /supp/lib/libreadline.4.3.dylib (No
such file or directory, errno = 2)
Trace/BPT trap

I tried this first, because I wanted to know if it had readline
support.
I think you linked against a libreadline youā€™ve installed locally, but
I
think you could link against the systems readline framework, how to do
so is described here:

http://cherryville.org/8896/ruby_readline_for_mac.html

I used his precompiled bundle, and now irb as-shipped has a history.
Yeah!

(Iā€™m using osx 10.2, btw)

Well, not really. This was really intended to be an either/or thing;
latest version/more stable. They install into /usr/local. I may be
mistaken, but I think that the libraryā€™s path is compiled in? Moving
them doesnā€™t work for me, anyway.

Suddenly a memory is floating upā€¦ If they were statically linked,
they could be placed anywhere, correct?

ā€“Mark

Ā·Ā·Ā·

On Mar 17, 2004, at 3:24 PM, Phil Tomson wrote:

In article 05A13C70-7863-11D8-B9F8-000502FDD5CC@mac.com,
Mark Hubbart discord@mac.com wrote:

Hi, all

I just posted some binary installer packages for Ruby 1.8.1 (stable
snapshot) and 1.9.0 (development snapshot), for installing on MacOSX.
They both are configured for use with the TclTkAqua libraries, and
will
install full ri documentation. You can get them at:

http://homepage.mac.com/discord/Ruby

I welcome your thoughts :slight_smile:

That sounds great. Can you choose alternate installation locations?

In article 88201E45-7918-11D8-B9F8-000502FDD5CC@mac.com,

1 - Iā€™ve been meaning to build 1.8 for ages, but havenā€™t because Iā€™m
lazy, and Iā€™d rather be working on my ruby projects. Now that you did
this, I have ruby1.8 locally. So, its useful.

2 - great that the samples and ri docs are there!

3 - it doesnā€™t have ruby/cocoa or ruby/aeosa, which I think are pretty
important for a ruby/os-x system

Iā€™ve tried to get rubycocoa it to compile and work properlyā€¦ but with
no luck. I think perhaps it needs updating to work with panther. If I
could get it working properly, I would include it as an optional
install in the package.

I believe there is a patch for Panther at the rubycocoa site.

Iā€™m running Ruby1.8.1 from the darwinports. I got the Ruby-1.8.1 package
and then the rb-cocoa package and after some bug reporting to the package
maintainer (those bugs are fixed now) It compiled/installed just fine. So
it is possible to get it working with Panther - you might want to go to
DarwinPorts and take a look at the rb-cocoa port, it contains the recipe
you need to build rubycocoa.

ā€¦I think for now Iā€™ll stick with my current setup as I would like to
play with ruby-cocoa.

Note to Apple if anyone there is listening: It would be great if you guys
would include the Ruby-Cocoa bindings in the official Rubyā€™s included in
OSX. Then we could develop Cocoa apps in Ruby and distribute them widely
without having to worry that users might not have the right
Ruby/Ruby-Cocoa versions available.

Phil

Ā·Ā·Ā·

Mark Hubbart discord@mac.com wrote:

On Mar 17, 2004, at 6:07 PM, Sam Roberts wrote:

[courtesy cc of this posting sent to cited author via email]

In article 11790D18-7928-11D8-B9F8-000502FDD5CC@mac.com,

Ā·Ā·Ā·

Mark Hubbart discord@mac.com wrote:

This explains the problem. OSX 10.3, it appears, ships with a working
libreadline.4.3 stuffed in /usr/lib, which is what my readline.bundle
was compiled against. Iā€™ll see if thereā€™s a way to fix this to work
automatically with 10.2, but it may need to be an optional package in
the installer.

No, libreadline is not shipped with Panther and the 1.6.8 version of Ruby
doesnā€™t include readline.bundle. It must have come from outside. Iā€™d to
insert a dependency in the Darwinport update I submitted for 1.8.1.

Ollivier ROBERT -=- EEC/AMI -=- ollivier.robert@eurocontrol.int
Usenet Canal Historique FreeBSD: The Power to Serve!

Wrote Mark Hubbart discord@mac.com, on Fri, Mar 19, 2004 at 07:03:26AM +0900:

6 - it has dependencies on your local system:

$ /usr/local/bin/irb
dyld: ruby canā€™t open library: /supp/lib/libreadline.4.3.dylib (No
such file or directory, errno = 2)
Trace/BPT trap

(Iā€™m using osx 10.2, btw)

This explains the problem. OSX 10.3, it appears, ships with a working
libreadline.4.3 stuffed in /usr/lib, which is what my readline.bundle

I donā€™t think it does. Note the error message? It refers to
ā€œ/supp/libā€

Is /supp an apple directory?

I would guess that you have some kind of ā€œportsā€ system that has put a
libreadline in /supp, and that /suppā€™s directories are earlier in your
paths than /usr/lib, so youā€™re not getting the standard readline.

Just a guess, but I think the /supp is suspicious!

Cheers,
Sam

Ā·Ā·Ā·

On Mar 17, 2004, at 6:07 PM, Sam Roberts wrote:

ā€“
Sam Roberts sroberts@certicom.com

In article 15C968EA-786E-11D8-B9F8-000502FDD5CC@mac.com,

In article 05A13C70-7863-11D8-B9F8-000502FDD5CC@mac.com,

Hi, all

I just posted some binary installer packages for Ruby 1.8.1 (stable
snapshot) and 1.9.0 (development snapshot), for installing on MacOSX.
They both are configured for use with the TclTkAqua libraries, and
will
install full ri documentation. You can get them at:

http://homepage.mac.com/discord/Ruby

I welcome your thoughts :slight_smile:

That sounds great. Can you choose alternate installation locations?

Well, not really. This was really intended to be an either/or thing;

Itā€™s not a big deal, I was just curious.

latest version/more stable. They install into /usr/local. I may be
mistaken, but I think that the libraryā€™s path is compiled in? Moving
them doesnā€™t work for me, anyway.

No, it should be relative to where youā€™re running the ruby binary from.
Iā€™ve taken a whole Ruby installation tree and moved it to a CD and then
taken the CD to a different machine without Ruby installed and run Ruby
from the CD - this was with a Windows installation, but I donā€™t think it
would be any different on OS X or Linux.

Suddenly a memory is floating upā€¦ If they were statically linked,
they could be placed anywhere, correct?

I donā€™t think it makes a difference.

Phil

Ā·Ā·Ā·

Mark Hubbart discord@mac.com wrote:

On Mar 17, 2004, at 3:24 PM, Phil Tomson wrote:

Mark Hubbart discord@mac.com wrote:

Oh, good! :slight_smile: Iā€™ll look into that. Iā€™m wondering now, if it would be
possible to compile one version of the RubyCocoa framework, and then
compile the .bundle extensions against different versions of rubyā€¦
that way, you could have one RubyCocoa framework, and it could work
with many versions of ruby. Seeing as I currently have ruby versions
1.6, 1.8 and 1.9 installed on my machine, that would be very helpful.

ā€“Mark

Ā·Ā·Ā·

On Mar 18, 2004, at 1:54 PM, Phil Tomson wrote:

I believe there is a patch for Panther at the rubycocoa site.

Iā€™m running Ruby1.8.1 from the darwinports. I got the Ruby-1.8.1
package
and then the rb-cocoa package and after some bug reporting to the
package
maintainer (those bugs are fixed now) It compiled/installed just fine.
So
it is possible to get it working with Panther - you might want to go to
DarwinPorts and take a look at the rb-cocoa port, it contains the
recipe
you need to build rubycocoa.

In article c3d4au019fq@enews4.newsguy.com,

Iā€™m running Ruby1.8.1 from the darwinports. I got the Ruby-1.8.1 package

Darwinports is really a nice system (if youā€™re more into compiling things
yourself that is). I used to compile 1.8.x myself but Iā€™ve switched to DP
now that Iā€™ve submitted the 1.8.1 update (committed by jkh).

Note to Apple if anyone there is listening: It would be great if you guys
would include the Ruby-Cocoa bindings in the official Rubyā€™s included in
OSX. Then we could develop Cocoa apps in Ruby and distribute them widely
without having to worry that users might not have the right

Iā€™d like to see them move to 1.8.x first. I know they looked into it
before Panther but 1.8.0 wasnā€™t officially released at that point.

Ā·Ā·Ā·

Phil Tomson ptkwt@aracnet.com wrote:

Ollivier ROBERT -=- EEC/AMI -=- ollivier.robert@eurocontrol.int
Usenet Canal Historique FreeBSD: The Power to Serve!

Wrote Ollivier Robert roberto@REMOVETHIS.eu.org, on Fri, Mar 19, 2004 at 09:04:32PM +0900:

[courtesy cc of this posting sent to cited author via email]

In article 11790D18-7928-11D8-B9F8-000502FDD5CC@mac.com,

This explains the problem. OSX 10.3, it appears, ships with a working
libreadline.4.3 stuffed in /usr/lib, which is what my readline.bundle
was compiled against. Iā€™ll see if thereā€™s a way to fix this to work
automatically with 10.2, but it may need to be an optional package in
the installer.

No, libreadline is not shipped with Panther and the 1.6.8 version of Ruby
doesnā€™t include readline.bundle. It must have come from outside. Iā€™d to
insert a dependency in the Darwinport update I submitted for 1.8.1.

But it seem you donā€™t need a libreadline.a, since OS X comes with the
.dylib, you only need the headers, which it doesnā€™t come with. At least,
thats what I picked up from the cherryville.org pages.

Cheers,
Sam

Ā·Ā·Ā·

Mark Hubbart discord@mac.com wrote:

ā€“
Sam Roberts sroberts@certicom.com

/supp, Iā€™m assuming, is a virtual directory denoting the search path
for all lib rootsā€¦ I get the same error. here:

First, looking in relevant directories:
% ls -l /System/Library/PrivateFrameworks/readline.framework
total 16
lrwxr-xr-x 1 root wheel 26 13 Nov 12:50 Resources ā†’
Versions/Current/Resources
drwxr-xr-x 4 root wheel 136 23 Sep 23:44 Versions
lrwxr-xr-x 1 root wheel 26 24 Sep 14:21 readline ā†’
/usr/lib/libreadline.dylib
% ls -l /usr/lib | grep readline
-r-xr-xr-x 1 mark staff 324308 6 Sep 2003 libreadline.4.3.dylib
lrwxr-xr-x 1 root admin 21 24 Sep 08:40 libreadline.4.dylib
ā†’ libreadline.4.3.dylib
-rw-rā€“r-- 1 mark staff 487060 6 Sep 2003 libreadline.a
lrwxr-xr-x 1 root admin 21 24 Sep 08:40 libreadline.dylib ā†’
libreadline.4.3.dylib

Next, testing readline:
% ruby -rreadline -eā€™printā€™
% sudo mkdir /usr/lib/lrl
% sudo mv /usr/lib/libreadline.* /usr/lib/lrl
% ruby -rreadline -eā€™printā€™
dyld: ruby canā€™t open library: /supp/lib/libreadline.4.3.dylib (No
such file or directory, errno = 2)
zsh: trace trap ruby -rreadline -eā€™printā€™

There is no /supp directory, so I have to assume that itā€™s virtual.
Also, the only readline in readline.framework/ is a symlink to the one
in /usr/lib. Iā€™m thinking that this means that it was put there by
Apple, since, I canā€™t imagine any packages deleting files in
/System/Library/PrivateFrameworksā€¦

Still, Iā€™ll need to look into this, to see if thereā€™s a good solution.
It seems that any Ruby package will either have to depend on the
developer tools being installed, or come with a copy of readline to
install in /usr/local/lib. I think over the weekend I can look into it
moreā€¦

ā€“Mark

Ā·Ā·Ā·

On Mar 19, 2004, at 6:33 AM, Sam Roberts wrote:

(Iā€™m using osx 10.2, btw)

This explains the problem. OSX 10.3, it appears, ships with a working
libreadline.4.3 stuffed in /usr/lib, which is what my readline.bundle

I donā€™t think it does. Note the error message? It refers to
ā€œ/supp/libā€

Is /supp an apple directory?

I would guess that you have some kind of ā€œportsā€ system that has put a
libreadline in /supp, and that /suppā€™s directories are earlier in your
paths than /usr/lib, so youā€™re not getting the standard readline.

Just a guess, but I think the /supp is suspicious!

well, okay. if, by ā€œoutsideā€, you mean ā€œXCodeā€ :slight_smile: Iā€™m 99% certain now
that the XCode dropped that in there. as for readline.bundle, no, that
doesnā€™t come with appleā€™s ruby, I know.

ā€“Mark

Ā·Ā·Ā·

On Mar 19, 2004, at 4:04 AM, Ollivier Robert wrote:

In article 11790D18-7928-11D8-B9F8-000502FDD5CC@mac.com,
Mark Hubbart discord@mac.com wrote:

This explains the problem. OSX 10.3, it appears, ships with a working
libreadline.4.3 stuffed in /usr/lib, which is what my readline.bundle
was compiled against. Iā€™ll see if thereā€™s a way to fix this to work
automatically with 10.2, but it may need to be an optional package in
the installer.

No, libreadline is not shipped with Panther and the 1.6.8 version of
Ruby
doesnā€™t include readline.bundle. It must have come from outside. Iā€™d
to
insert a dependency in the Darwinport update I submitted for 1.8.1.

Quoteing ptkwt@aracnet.com, on Thu, Mar 18, 2004 at 09:39:34AM +0900:

latest version/more stable. They install into /usr/local. I may be
mistaken, but I think that the libraryā€™s path is compiled in? Moving
them doesnā€™t work for me, anyway.

No, it should be relative to where youā€™re running the ruby binary from.

Not on a un*x system. The paths will be hard-coded in, and it wonā€™t
matter how they are linked.

I donā€™t believe it is possible for an executable to reliably determine
where the os loaded itā€™s image from on a un*x system. And if you rm a
program after loading it, it wonā€™t have a location.

Sam

How can I alter the TCPSocket connect timeout? If I wanted less than
whatever it uses, I could use timeout(), but if I want more time?

brian bsl04@uark.edu wrote in message news:405A219D.2070505@uark.eduā€¦

How can I alter the TCPSocket connect timeout? If I wanted less than
whatever it uses, I could use timeout(), but if I want more time?

Ive used something like this before (untested)

require ā€˜socketā€™
include ā€˜socketā€™

class Socket

def setTimeOut( t)
    @timeOut =t
end

end

I dont have the code here, so it could be way offā€¦