Irb completion fails on Intel Mac with ruby-1.8.5

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

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

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

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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs