Help us understand the problem. What is going on with this article?

rails5を入れようとしたらnokogiriで怒られた

More than 3 years have passed since last update.

rails5をinstallしようとしたら、nokogiriの1.6.8がinstall出来なくて怒られた
vim Gemfileで編集

source 'https://rubygems.org'

gem 'rails', '5.0.0.rc1'

bundle installを実行

bundle install --path vendor/bundle

すると以下みたいなErrorが出てinstall失敗する。

An error occurred while installing nokogiri (1.6.8), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.8'` succeeds before bundling.
$

qiitaを探してたら同じ問題ハマってる記事を発見
参考:bundler でnokogiriがインストールできなかった件の対応 実はbrew側の問題だった

参考にCommand打ってみる

$ brew link --force libxml2
Linking /usr/local/Cellar/libxml2/2.9.4... 17 symlinks created
$ brew link --force libxslt
Linking /usr/local/Cellar/libxslt/1.1.28_1... 22 symlinks created
$

再度bundl installしてみると無事成功

$ bundle install --path vendor/bundle
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away