# Irb completion fails on Intel Mac with ruby-1.8.5

**URL:** <https://www.ruby-forum.com/t/irb-completion-fails-on-intel-mac-with-ruby-1-8-5/86150>\
**Category:** Ruby\
**Created:** [February 20, 2007, 7:42am UTC](https://www.ruby-forum.com/t/irb-completion-fails-on-intel-mac-with-ruby-1-8-5/86150 "2007-02-20T07:42:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sauy7](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ecc23a/32.png) [@sauy7](https://www.ruby-forum.com/u/sauy7)\
**Post date:** [February 20, 2007, 7:42am UTC](https://www.ruby-forum.com/t/irb-completion-fails-on-intel-mac-with-ruby-1-8-5/86150/1 "2007-02-20T07:42:39Z")

</div>

Building ruby-1.8.5-p12 on OS X 10.4 gave me an irb that  
supported command completion, but did not have support  
for vi\_editing\_mode.

% irb  
irb(main):001:0\> Readline.vi\_editing\_mode  
NotImplementedError: the vi\_editing\_mode() function is unimplemented  
on this machine  
from (irb):1:in `vi\_editing\_mode’  
from (irb):  
from :0

Which essentially meant it was stuck in emacs editing mode.  
I then added readline from darwin ports and rebuilt ruby:

sudo port install readline  
… install ruby

But, now I irb won’t even run:

% irb  
dyld: NSLinkModule() error  
dyld: Symbol not found: \_rl\_filename\_completion\_function  
Referenced from: /opt/local/ruby-1.8.5-p12/lib/ruby/site\_ruby/1.8/  
i686-darwin8.8.2/readline.bundle  
Expected in: flat namespace

My next attempt will be to install the gnu readline and retry.  
But, while I do that, does anyone know if this is a known problem and  
how to fix it?

Thanks

Jim

---

<div class="post-metadata">

**Author:** ![sauy7](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ecc23a/32.png) [@sauy7](https://www.ruby-forum.com/u/sauy7)\
**Post date:** [February 20, 2007, 2:52pm UTC](https://www.ruby-forum.com/t/irb-completion-fails-on-intel-mac-with-ruby-1-8-5/86150/2 "2007-02-20T14:52:38Z")

</div>

Well, this has never happened to me before.  
I have built ruby-1.8.5 with every possible combination  
for readline (apple’s readline and gnu readline) and none  
have worked.

On Feb 20, 2007, at 12:41 AM, Jim F. wrote:

> My next attempt will be to install the gnu readline and retry.

This failed also, generating the output:

% irb  
dyld: NSLinkModule() error  
dyld: Symbol not found: \_rl\_filename\_completion\_function  
Referenced from: /opt/local/ruby-1.8.5-p12/lib/ruby/1.8/i686-  
darwin8.8.2/readline.bundle  
Expected in: flat namespace

Trace/BPT trap

Has anyone successfully built ruby with readline support on Intel Mac  
and have some instructions on how they did it?

Thanks

Jim

---

<div class="post-metadata">

**Author:** ![sauy7](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ecc23a/32.png) [@sauy7](https://www.ruby-forum.com/u/sauy7)\
**Post date:** [February 20, 2007, 6:03pm UTC](https://www.ruby-forum.com/t/irb-completion-fails-on-intel-mac-with-ruby-1-8-5/86150/3 "2007-02-20T18:03:26Z")

</div>

On Tue, Feb 20, 2007, Jim F. wrote:

> Well, this has never happened to me before.  
> I have built ruby-1.8.5 with every possible combination  
> for readline (apple’s readline and gnu readline) and none  
> have worked.

I suspect something is hosed in your macports directory. I’ve been  
using the macports ruby on intel since the intel procs came out and it  
works fine.

Try uninstalling ruby, readline, and all peripheral things, doing a  
clean, and rebuilding them. My guess is there are some cached build  
files laying around that are breaking your builds.

Ben

---

<div class="post-metadata">

**Author:** ![sauy7](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ecc23a/32.png) [@sauy7](https://www.ruby-forum.com/u/sauy7)\
**Post date:** [February 21, 2007, 10:17am UTC](https://www.ruby-forum.com/t/irb-completion-fails-on-intel-mac-with-ruby-1-8-5/86150/4 "2007-02-21T10:17:08Z")

</div>

I second this. I’ve got tab completion in my irb with Ruby 1.8.5 no  
problem. And a ton of other silliness, too, I really pimped out my irb  
for no reason. If you’ve been using ports from the beginning  
everything ports has installed will be in /opt/local, generally  
speaking, so you can just throw that dir in the trash and start it  
over again. I’ve heard readline is quirky but when I did the port  
install it went OK for me. Anyway, wish I could be more helpful, but  
what you’re trying to do is definitely possible, it’s just something  
probably went wrong in your ports dir like Ben’s saying.
