LoginSignup
5
6

More than 5 years have passed since last update.

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

Posted at

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
5
6
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
5
6