ozbillwang
10/13/2014 - 6:39 AM

Fix the issue when run "bundle install" and got "libxml2 is missing" issues.md

Fix the issue when run "bundle install" and got "libxml2 is missing" issues


IMPORTANT! Nokogiri builds and uses a packaged version of libxslt.

If this is a concern for you and you want to use the system library instead, abort this installation process and reinstall nokogiri as follows:

gem install nokogiri -- --use-system-libraries

If you are using Bundler, tell it to use the option:

bundle config build.nokogiri --use-system-libraries
bundle install

Make sure xCode 4.3 is installed first!!!

Command line tools no longer come bundled with xCode, install it by going to:

preferences -> downloads -> command line tools

Install RVM

bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

Then restart terminal

Install Ruby 1.9.3 through RVM (need to specify clang compiler)

rvm install 2.1.3 --with-gcc=clang

Switch from System's Ruby config to our desired Ruby config (and associated gems)

rvm use 2.1.3

run command "bundle install"

bundle config build.nokogiri --use-system-libraries bundle install