Installing Ruby 1.9.3 on Mac OS X 10.8.2
I had considerable trouble installing Ruby 1.9.3 on my Macs due to a problem with readline, and Googling revealed that the problem was widely known but there weren't any working solutions.
The error I was getting was:
readline.c: In function ‘username_completion_proc_call’:
readline.c:1386: error: ‘username_completion_function’ undeclared (first use in this function)
After many hours of struggling and searching over an extended period, I finally managed to piece together something that worked for installing via rvm. Here it is:
curl -O ftp://ftp.gnu.org/gnu/readline/readline-6.2.tar.gz
tar xzvf readline-6.2.tar.gz
cd readline-6.2
./configure --prefix=/usr/local
cd shlib
sed -e 's/-dynamic/-dynamiclib/' Makefile > Makefile.good
mv Makefile.good Makefile
cd ..
make
sudo make install
cd ..
rvm install 1.9.3 -C --with-readline-dir=/usr/local/
Written by Ken Hagler
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#