Mac OS X 10.4 + Rails console + readline problem

Today I ran into this problem when trying to use my rails or ruby consoles:

[etagwerker@benteveo photos]$ irb
dyld: NSLinkModule() error
dyld: Symbol not found: _rl_filename_completion_function
Referenced from: /usr/local/lib/ruby/1.8/i686-darwin8.11.1/readline.bundle

Somehow I thought I had solved this problem months ago, but it came back! (Or maybe I had never solved it for real). Today, I noticed this problem when trying to run the ruby or rails console. AKA, irb and script/console respectively.

So, after a few cups of coffee and googling for almost two hours for the following terms:

  • “dyld: Symbol not found: _rl_filename_completion_function”
  • Mac OS X 10.4
  • Rails console
  • Ruby console (irb)
  • readline, readline.bundle

I finally found a solution for the problem. Hopefully, this time it won’t come back. Although no one knows (I’m an expert in messing up environments! And these days I’m maintaining code that uses different ruby/rails versions.. Ughh..)

I tried to follow Dan Benjamin‘s advice (http://danbenjamin.com/articles/2005/12/ruby_rails_lighttpd_mysql_tiger) but that didn’t help. BTW, it is a great tutorial. Somehow it wasn’t solving my problem.

I tried to follow the suggestions mentioned in this thread (http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/5118) and that did it.

To sum things up, this is what I did:

  1. Searched in my mac OS X for readline.bundle
  2. Luckily, I found it
  3. cd readline
  4. ruby extconf.rb
  5. rm *.0 *.bundle
  6. sudo make install

To check that it was actually solved:

  1. irb
  2. script/console (on my rails project)

Problem solved!

This entry was posted in developer tools, linux/unix world, web programming and tagged , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Spam protection by WP Captcha-Free