Installing the Ultraviolet Gem On OS X

Installing the syntax-highlighting ultraviolet gem can be a little tricky as it has system level dependencies that need to be installed. If you try to just run… gem install ultraviolet …you'll probably get an error like "error: oniguruma.h: No such file or directory." So, the first step is to install the Oniguruma header files which the ruby gems will depend on. You can use MacPorts, Homebrew, or do it manually port install Oniguruma5 OR brew install oniguruma Next, install the Oniguruma gem. gem install oniguruma -- --with-opt-dir= The important part above is to replace <- path/to/oniguruma -> with the install path of the oniguruma header files from the first step. With MacPorts, this might be something simple like /opt/local Using Homebrew, I had to point it directly at the Oniguruma install directory at /Users//Developer/Cellar/oniguruma/ Assuming that finishes successfully, you should be able to run a… gem install ultraviolet …with no problems.