Gah! OS X readline!

Yes, I am aware that this has come up before. I have tried all past
suggestions that I can find archived, however, and I am still at a
frustrating impasse. Running Mac OS 10.3.5 with developer tools
installed, I have tried installing Ruby 1.8.1 both from available
package, as well as building myself from source. Readline appears
installed, and indeed works fine for other applications (psql client
for postgres, for example - or even Ruby 1.6.8 works fine). Readline
module compilation reports success during Ruby 1.8.1 build.

Even so, `ruby -rreadline -e'print'` returns:

dyld: ruby can't open library:
/System/Library/PrivateFrameworks/readline.framework/Versions/A/readline
(No such file or directory, errno = 2)
Trace/BPT trap

Given the "No such file" message, I added a symlink named 'readline' to
/usr/lib/libreadline.dylib under
/System/Library/PrivateFrameworks/readline.framework/Versions/A/ -- but
still get the same error.

Any help or further suggestions much appreciated. Does anybody out
there have a working readline.bundle compiled under 10.3.5?
Thanks,
Thomas Yager-Madden
http://syntactician.com

Mac OS X.3 does have the readline lib installed. It does not install the readline header files for Ruby to link against in the build process.

I solved this by downloading and building from source the latest version of GNU's lib, then rebuilding Ruby. Worked perfectly.

Hope that helps.

James Edward Gray II

···

On Oct 6, 2004, at 8:34 AM, Thomas Yager-Madden wrote:

Any help or further suggestions much appreciated. Does anybody out
there have a working readline.bundle compiled under 10.3.5?

Ditto =)

Installing fresh gnu-readline actually made lots of things happier. I wonder why Apple broke it =/

May be worth a FAQ in the ruby install readme.

-Brian

···

On Oct 6, 2004, at 10:11 AM, James Edward Gray II wrote:

On Oct 6, 2004, at 8:34 AM, Thomas Yager-Madden wrote:

Any help or further suggestions much appreciated. Does anybody out
there have a working readline.bundle compiled under 10.3.5?

Mac OS X.3 does have the readline lib installed. It does not install the readline header files for Ruby to link against in the build process.

I solved this by downloading and building from source the latest version of GNU's lib, then rebuilding Ruby. Worked perfectly.

Hope that helps.

James Edward Gray II

Thanks, James and Brian. I am happy to say I also have now solved my
problem by installing readline 5.0 from GNU.org. I didn't even have
to rebuild Ruby; just changed my symlink back in
System/Library/PrivateFrameworks/readline.framework/Versions/A/ to
point to /usr/local/lib/libreadline.dylib.
Like a charm. I appreciate the tip, guys.

Glad to hear 5.0 worked for you. I am a big coward and installed 4.3 :wink:

-Brian

···

On Oct 6, 2004, at 10:49 AM, Thomas Yager-Madden wrote:

Thanks, James and Brian. I am happy to say I also have now solved my
problem by installing readline 5.0 from GNU.org. I didn't even have
to rebuild Ruby; just changed my symlink back in
System/Library/PrivateFrameworks/readline.framework/Versions/A/ to
point to /usr/local/lib/libreadline.dylib.
Like a charm. I appreciate the tip, guys.

Hey, is anyone else using (or attempting to use) Alph?

It's a Ruby GUI framework based on Flash/Actionscript.

http://alph.rubyforge.org/wiki/wiki.pl?HomePage

If anyone else has gotten this to run can you help me figure out how to
install it successfully. It doesn't have an "install" script, and I can't
seem to get Ruby to "see" it (i.e. a "require" doesn't find it).

Regards, Abe

A different way to do it if you're using DarwinPorts is to install
lang/ruby from there. There is a dependency on devel/readline so
you get readline support when installing Ruby.

···

On Wed, 06 Oct 2004 08:48:15 -0700, Thomas Yager-Madden wrote:

Thanks, James and Brian. I am happy to say I also have now solved my
problem by installing readline 5.0 from GNU.org. I didn't even have
to rebuild Ruby; just changed my symlink back in
System/Library/PrivateFrameworks/readline.framework/Versions/A/ to
point to /usr/local/lib/libreadline.dylib.
Like a charm. I appreciate the tip, guys.

* Ollivier Robert <roberto@REMOVETHIS.eu.org> [1000 17:00]:

> Thanks, James and Brian. I am happy to say I also have now solved my
> problem by installing readline 5.0 from GNU.org. I didn't even have
> to rebuild Ruby; just changed my symlink back in
> System/Library/PrivateFrameworks/readline.framework/Versions/A/ to
> point to /usr/local/lib/libreadline.dylib.
> Like a charm. I appreciate the tip, guys.

A different way to do it if you're using DarwinPorts is to install
lang/ruby from there. There is a dependency on devel/readline so
you get readline support when installing Ruby.

For the record - seeing as I was bitching about NetBSD support, I just
found if I untar the ruby 1.8 source and do:

cd <ruby-source-dir>
./configure --enable-shared --enable-pthread --prefix=/usr/local
cd ext/readline
ruby extconf.rb --with-readline-dir=/usr/pkg
cd -
make

then everything hangs together nicely. My guess is /usr/local would be
searched anyway, which explains why /usr/local/lib/libreadline.dylib
might help.

···

On Wed, 06 Oct 2004 08:48:15 -0700, Thomas Yager-Madden wrote:

--

If you read the README, you'll see:

  ./README # this file
  ./readme.html # main documentation
  ./readme.css # style sheet for readme.html
  ./alph_icons.pdf # list of included graphic icons in Alph
  ./examples/.. # actual Alph ruby examples + binary flash stuff
  ./lib/.. # alph Ruby code
  ./actionscript/.. # ActionScript classes (package org/rubyforge/alph)
                      if you really want to see the guts of operation.
  ./java/.. # Obsidian cross-platform projector

You should also have an additional swt directory; see the documentation
for more details.

If you want to install Alph, you'll need to:

  1. Make sure you can run the examples (I'm still on this step; the swt
     library doesn't seem to like my hybrid redhat 7.2/7.3/9.0/fedora
     core 2/rawide machine).
  2. Copy the lib directory to the right place (for me, this is
     /usr/local/lib/ruby/site_ruby/1.8); require 'alph' should now work.
  3. Copy the java directory to its desired location. Add it to your
     classpath.
  4. Copy the swt directory to its desired location. When you create
     your application, instantiate it with the path to the swt
     directory:
      app = Alph::Application.new('/usr/local/alph/swt')

This assumes that you want to use Alph for standalone guis. If you want
to use it for web applications, a little more needs to be done, but I'm
not completely sure what yet, as I'm stilly trying to get it to work
(the flash movie seems to be returning nil for any request that is made
of it; I'm sure I'm doing something wrong but I don't know what yet).

Paul

···

On Wed, Oct 06, 2004 at 11:57:59PM +0900, Abraham Vionas_mailinglist wrote:

Hey, is anyone else using (or attempting to use) Alph?

It's a Ruby GUI framework based on Flash/Actionscript.

http://alph.rubyforge.org/wiki/wiki.pl?HomePage

If anyone else has gotten this to run can you help me figure out how to
install it successfully. It doesn't have an "install" script, and I can't
seem to get Ruby to "see" it (i.e. a "require" doesn't find it).