How to install Nokogiri on Mac OS Sierra 10.12

后端 未结 8 1732
孤街浪徒
孤街浪徒 2021-01-29 22:38

I\'m having troubles installing Nokogiri (1.6.8.1) on Mac OS Sierra 10.12.

I tried using brew install libxml2 libxslt and then referencing the install direc

8条回答
  •  遥遥无期
    2021-01-29 23:01

    Try install libxml2 first with Homebrew.

    brew install libxml2
    

    Then if installing with bundle

    bundle config build.nokogiri --use-system-libraries \
      --with-xml2-include=$(brew --prefix libxml2)/include/libxml2
    bundle install
    

    If installing directly with gem

    gem install nokogiri -- --use-system-libraries \
      --with-xml2-include=$(brew --prefix libxml2)/include/libxml2
    

提交回复
热议问题