12
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

bundle install時に、libv8やtherubyracerでエラーが出た

Last updated at Posted at 2020-05-29

概要

既存のプロジェクトに参画する際、Railsの環境を構築するとき、libv8やtherubyracerにより以下のようなエラーが出たので対処方法を記載する。

# libv8のエラー
An error occurred while installing libv8(3.16.14.19), and Bundler
cannot continue.
Make sure that `gem install libv8 -v '3.16.14.19' --source
'http://rubygems.org/'` succeeds before bundling

# therubyracerのエラー
An error occurred while installing therubyracer(0.12.3), and Bundler
cannot continue.
Make sure that `gem install therubyracer -v '0.12.3' --source
'http://rubygems.org/'` succeeds before bundling

解決方法

下記の参考資料を参考にし、以下のコマンドにより解決した。

> brew install v8@3.15
> bundle config --local build.libv8 --with-system-v8
> bundle config --local build.therubyracer --with-v8-dir=$(brew --prefix v8@3.15)

上記コマンドを実行した後に、bundle installをすると成功した。

終わりに

今回は解決策のみ記載したが、libv8やtherubyracerの内容もしっかりと記載したい。

参考資料

 ・ https://gist.github.com/fernandoaleman/868b64cd60ab2d51ab24e7bf384da1ca
 ・ https://www.task-notes.com/entry/20170402/1491058800

12
7
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
12
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?