RVM on OSX Snow Leopard & Readline Errors

| Comments

There seems to be an issue with the system readline utility which prevents Rubies installed by rvm from being compiled. One way of fixing the problem is to install your own version of readline.

Errors in the make log:

readline.c: In function ‘username_completion_proc_call’: readline.c:730: error: ‘username_completion_function’ undeclared (first use in this function) readline.c:730: error: (Each undeclared identifier is reported only once readline.c:730: error: for each function it appears in.) make[1]: *** [readline.o] Error 1

Your own readline

Compile and install your own readline:

curl -O ftp://ftp.gnu.org/gnu/readline/readline-6.1.tar.gz tar xzvf readline-6.1.tar.gz cd readline-6.1 ./configure --prefix=/usr/local make sudo make install cd ..

Give rvm another try …

First you have to remove Ruby versions you tried to compile before:

rvm remove 1.9.1

The following command with a reference to the newly installed newline should do the job:

rvm install 1.9.1 -C --with-readline-dir=/usr/local/