Note: outdated. Check this post instead.
Compiling Ruby on FreeBSD is not quite simple.
- make sure to tell it to also find libraries in /usr/local
- and tell configurescript to find OpenSSL in/usrbecause the later version isn’t quite compatible with latest ruby yet
So here’s the configure line
CFLAGS=-I/usr/local/include \ CPPFLAGS=-I/usr/local/include \ LDFLAGS=-L/usr/local/lib \ ./configure --prefix="/opt/ruby23" --disable-install-doc --with-openssl-dir=/usr \ && make \ && make install