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…