Skip to content

Instantly share code, notes, and snippets.

@bytepicker
Created February 14, 2015 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bytepicker/af34f637aceff67b9fb7 to your computer and use it in GitHub Desktop.
Save bytepicker/af34f637aceff67b9fb7 to your computer and use it in GitHub Desktop.
Mac OS 10.10.2 + Ruby on Rails
ruby 2.1.5p273 + Rails 4.2.0 + Homebrew 0.9.5
If you follow the guide from https://gorails.com/setup/osx/10.10-yosemite or similar
and get the nokogiri error like:
$ rails new myapp
checking for xmlParseDoc() in libxml/parser.h... no
checking for xmlParseDoc() in -lxml2... no
checking for xmlParseDoc() in -llibxml2... no
-----
libxml2 is missing. Please locate mkmf.log to investigate how it is failing.
-----
You should you this trick:
$ brew tap homebrew/dupes
$ brew install libxml2 libxslt libiconv
$ brew link --force libxml2 libxslt libiconv
$ bundle config build.nokogiri --use-system-libraries --with-iconv-dir="$(brew --prefix libiconv)"
$ bundle install --path vendor/bundle
and try again:
$ rails new myapp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment