Skip to content

Installing Oniguruma

Ruby 1.8.6 does not support look-behind using its default regular expression engine. To get this support, I needed the Oniguruma library and gem. Installation was a bit confusing on Mac OS X Leopard. These blog posts were helpful to get me started:

So, here is my (currently) up-to-date version, no Ruby recompilation needed:

# Install Oniguruma library
cd ~/sources
wget wget http://www.geocities.jp/kosako3/oniguruma/archive/onig-5.9.1.tar.gz
tar -xvzf onig-5.9.1.tar.gz
cd onig-5.9.1
./configure
make
sudo make install
# Libraries installed in: /usr/local/lib

sudo gem install oniguruma
# Successfully installed oniguruma-1.1.0
# Ignore RDoc warning about oregexp_initialize

I’ve tested this on my Mac Book Pro and two Ubuntu Gutsy servers.

Update: Goodbye Helicopter has up-to-date Oniguruma installation instructions for Mac OS X. They are essentially the same as what I showed above.

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*