Tiger and ruby-readline

Posted by Jonathan

There was lots of writing about Tiger and Ruby. Tiger ships Ruby 1.8 but without GNU-readline support (e.g. for irb) and without support for C-extensions. Readline was probably left out because of license issues, Tiger has libedit.

Chad Fowler released a nice gem called fixrbconfig that fixes the C-extension issue and Lucas Carlson has written a script that automaticly downloads and uses fixrbconfig and fixes Ruby to use GNU-readline. I do not want to repeat instructions on how to use it.

What I want to say is what to do if you get this error when you execute the fix-ruby-tiger.sh script:

readline.c: In function ‘username_completion_proc_call’:
readline.c:673: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:673: warning: assignment makes pointer from integer without a cast
make: ** [readline.o] Error 1

do a “sudo rm -rf /usr/lib/libreadline” and re-execute the script. Then you should have Tiger with a Ruby version that is capable of installing C-extensions and uses GNU-readline.

Thanks to Lucas Carlson for helping me with this