Tuesday, April 9, 2013

Ruby 1.8.7-p358 on Mountain Lion with RVM

While trying to install 1.8.7-p358 I ran into a compile error
/usr/include/tk.h:78:23: error: X11/Xlib.h: No such file or directory
I found the answer to the problem here and an explanation here.

Resolving the problem is easy. Just follow these steps:

  1. Install xQuartz
  2. Tell the compiler to use the correct installation with: export CPPFLAGS=-I/opt/X11/include
  3. Then try to attempt to install again with rvm: rvm install 1.8.7-p358