# Gah! OS X readline!

**URL:** <https://rubytalk.org/t/gah-os-x-readline/13994>\
**Category:** ruby-talk\
**Created:** [6 October 2004 13:34 UTC](https://rubytalk.org/t/gah-os-x-readline/13994 "2004-10-06T13:34:50Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas8](https://avatars.discourse-cdn.com/v4/letter/t/51bf81/32.png) [@Thomas8](https://rubytalk.org/u/Thomas8)\
**Post date:** [6 October 2004 13:34 UTC](https://rubytalk.org/t/gah-os-x-readline/13994/1 "2004-10-06T13:34:50Z")

</div>

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](http://syntactician.com)

---

<div class="post-metadata">

**Author:** ![James\_Edward\_Gray\_II](https://avatars.discourse-cdn.com/v4/letter/j/ea5d25/32.png) [@James\_Edward\_Gray\_II](https://rubytalk.org/u/James_Edward_Gray_II)\
**Post date:** [6 October 2004 14:11 UTC](https://rubytalk.org/t/gah-os-x-readline/13994/2 "2004-10-06T14:11:20Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Brian\_McCallister2](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@Brian\_McCallister2](https://rubytalk.org/u/Brian_McCallister2)\
**Post date:** [6 October 2004 14:29 UTC](https://rubytalk.org/t/gah-os-x-readline/13994/3 "2004-10-06T14:29:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Thomas8](https://avatars.discourse-cdn.com/v4/letter/t/51bf81/32.png) [@Thomas8](https://rubytalk.org/u/Thomas8)\
**Post date:** [6 October 2004 14:49 UTC](https://rubytalk.org/t/gah-os-x-readline/13994/4 "2004-10-06T14:49:50Z")

</div>

Thanks, James and Brian. I am happy to say I also have now solved my  
problem by installing readline 5.0 from [GNU.org](http://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.

---

<div class="post-metadata">

**Author:** ![Brian\_McCallister2](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@Brian\_McCallister2](https://rubytalk.org/u/Brian_McCallister2)\
**Post date:** [6 October 2004 14:53 UTC](https://rubytalk.org/t/gah-os-x-readline/13994/5 "2004-10-06T14:53:51Z")

</div>

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

-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.

---

<div class="post-metadata">

**Author:** ![Abe\_Vionas](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@Abe\_Vionas](https://rubytalk.org/u/Abe_Vionas)\
**Post date:** [6 October 2004 14:57 UTC](https://rubytalk.org/t/gah-os-x-readline/13994/6 "2004-10-06T14:57:59Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![Ollivier\_Robert5](https://avatars.discourse-cdn.com/v4/letter/o/54ee81/32.png) [@Ollivier\_Robert5](https://rubytalk.org/u/Ollivier_Robert5)\
**Post date:** [6 October 2004 15:59 UTC](https://rubytalk.org/t/gah-os-x-readline/13994/7 "2004-10-06T15:59:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Dick\_Davies1](https://avatars.discourse-cdn.com/v4/letter/d/22d042/32.png) [@Dick\_Davies1](https://rubytalk.org/u/Dick_Davies1)\
**Post date:** [6 October 2004 23:02 UTC](https://rubytalk.org/t/gah-os-x-readline/13994/8 "2004-10-06T23:02:28Z")

</div>

\* 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:
> 
> --

---

<div class="post-metadata">

**Author:** ![Paul\_Brannan](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@Paul\_Brannan](https://rubytalk.org/u/Paul_Brannan)\
**Post date:** [8 October 2004 14:11 UTC](https://rubytalk.org/t/gah-os-x-readline/13994/9 "2004-10-08T14:11:42Z")

</div>

If you read the README, you'll see:

&nbsp;&nbsp;./README # this file  
&nbsp;&nbsp;./readme.html # main documentation  
&nbsp;&nbsp;./readme.css # style sheet for readme.html  
&nbsp;&nbsp;./alph\_icons.pdf # list of included graphic icons in Alph  
&nbsp;&nbsp;./examples/.. # actual Alph ruby examples + binary flash stuff  
&nbsp;&nbsp;./lib/.. # alph Ruby code  
&nbsp;&nbsp;./actionscript/.. # ActionScript classes (package org/rubyforge/alph)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if you really want to see the guts of operation.  
&nbsp;&nbsp;./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:

&nbsp;&nbsp;1. Make sure you can run the examples (I'm still on this step; the swt  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;library doesn't seem to like my hybrid redhat 7.2/7.3/9.0/fedora  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;core 2/rawide machine).  
&nbsp;&nbsp;2. Copy the lib directory to the right place (for me, this is  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/usr/local/lib/ruby/site\_ruby/1.8); require 'alph' should now work.  
&nbsp;&nbsp;3. Copy the java directory to its desired location. Add it to your  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;classpath.  
&nbsp;&nbsp;4. Copy the swt directory to its desired location. When you create  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;your application, instantiate it with the path to the swt  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;directory:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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](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).
