Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 1.42 KB

installation-of-charlock-holmes-on-macos.md

File metadata and controls

31 lines (24 loc) · 1.42 KB
title emoji type topics published order layout
macOS で charlock_holmes がインストールできないときの解決法
👻
tech
Rails
Ruby
Rails4
Rails5
true
53
article

macOS で Rails アプリケーションの環境構築をするために bundle install をしたら、charlock_holmes のインストールでエラーが出ました。

An error occurred while installing charlock_holmes (0.7.5), and Bundler cannot continue.
Make sure that `gem install charlock_holmes -v '0.7.5' --source 'https://rubygems.org/'` succeeds before bundling.

そんなときは以下のコマンドを実行します。

$ brew install icu4c cmake
# 'x.x.x' をインストールしたいバージョンに置き換える
$ gem install charlock_holmes -v 'x.x.x' -- --with-cppflags=-DU_USING_ICU_NAMESPACE=1 --with-cxxflags=-std=c++11

x.x.x の箇所は、インストールしたい charlock_holmes のバージョンを指定します。たとえば上記のエラーでは 0.7.5 をインストールしようとしているので、その場合は x.x.x の箇所を 0.7.5 に置き換えます。

これで charlock_holmes がインストールできるようになりました。

参考