LoginSignup
38
39

More than 5 years have passed since last update.

nokogiriのインストールでこける場合の対処

Posted at

色々なgemが依存しているnokogiriですが、homebrewからlibiconvが削除されたためビルドに失敗することがあります。
チュートリアルではlibiconvを別途インストールするのが推奨されており、こちらでも解決可能ですが、個人的にあまりsudoしたくないのでhomebrewで解決してみます。
以下の手順でビルド可能です。

nokogiri_install
brew tap homebrew/dupes
brew install libxml2 libxslt libiconv
brew link libxml2 libxslt libiconv
gem install nokogiri

最近のhomebrewはbrew tapでリポジトリが追加できるようになっています。もしbrew tapでエラーが出る場合はbrew updateを試してみて下さい。

38
39
1

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
38
39