LoginSignup
7
7

More than 5 years have passed since last update.

Nokogiri on OSX

Posted at
  • osx mavericks
  • brew環境
  • nokogiri 1.6.2.1
  • ruby 2.0.0p451
  • XCode 5.1.1

libxml2 is missing.となり、nokogiriがインストールできない。

Nokogiriのインストール

shell
$ brew install libxml2 libxslt libiconv
shell
$ brew link libxml2 --force
$ brew link libxslt --force
$ brew link libiconv --force
shell
$ sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future NOKOGIRI_USE_SYSTEM_LIBRARIES=1 gem install nokogiri -- --use-system-libraries --with-iconv-dir="$(brew --prefix libiconv)" --with-xml2-config="$(brew --prefix libxml2)/bin/xml2-config" --with-xslt-config="$(brew --prefix libxslt)/bin/xslt-config"

vagrant-omnibusを入れる場合

shell
$ NOKOGIRI_USE_SYSTEM_LIBRARIES=1 vagrant plugin install vagrant-omnibus
7
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
7