Skip to content

Instantly share code, notes, and snippets.

@OliverLetterer
Forked from jocubeit/gist:1713910
Created August 25, 2013 08:29
Show Gist options
  • Select an option

  • Save OliverLetterer/6332687 to your computer and use it in GitHub Desktop.

Select an option

Save OliverLetterer/6332687 to your computer and use it in GitHub Desktop.

Revisions

  1. Dom created this gist Jan 31, 2012.
    27 changes: 27 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    # Install libxml2 using Homebrew
    # If you don't have Homebrew, follow the instructions at:
    # https://github.com/mxcl/homebrew/wiki/Installation
    # -------------------------------------------------------
    brew install libxml2

    # Install libxslt from source code
    # If you don't have wget, follow the instructions at:
    # http://www.mactricksandtips.com/2008/07/installing-wget-on-your-mac-for-terminal.html
    # Or use Homebrew:
    # brew install wget
    # -------------------------------------------------------------------------------------
    wget ftp://xmlsoft.org/libxml2/libxslt-1.1.26.tar.gz
    tar xvfz libxslt-1.1.26.tar.gz
    cd libxslt-1.1.26
    ./configure --prefix=/usr/local/Cellar/libxslt/1.1.26 --with-libxml-prefix=/usr/local/Cellar/libxml2/2.7.8
    make
    sudo make install

    # Install libiconv using Homebrew:
    # --------------------------------
    brew install libiconv
    sudo brew link libiconv

    # Install the Nokogiri gem passing in all the dependency paths:
    # -------------------------------------------------------------
    gem install nokogiri -- --with-xml2-include=/usr/local/Cellar/libxml2/2.7.8/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.7.8/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26 --with-iconv-include=/usr/local/Cellar/libiconv/1.14/include --with-iconv-lib=/usr/local/Cellar/libiconv/1.14/lib