LoginSignup
0
0

More than 3 years have passed since last update.

Railsの環境構築でハマったのでメモ

Last updated at Posted at 2020-08-27

環境ぶっ壊れてrailsの環境構築し直したら色々エラーに悩まされたので自分用にメモ
詰まるポイント全部乗せみたいな感じで解決まで時間がかかってしまった...
なんだかんだこのエラーぶち当たること多い気がするので次はすぐできるようにメモしておこうかなと

最初のエラー

最初は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 'https://rubygems.org/'` succeeds before bundling.
 libv8対策
bundle config --local build.libv8 --with-system-v8 
bundle config --local build.therubyracer --with-v8-dir=$(brew --prefix v8-315)
mysql2対策
$ bundle config --local build.mysql2 "--with-cppflags=-I/usr/local/opt/openssl/include"
$ bundle config --local build.mysql2 "--with-ldflags=-L/usr/local/opt/openssl/lib"
therubyracer対策
$ brew install v8@3.15
$ bundle config build.libv8 --with-system-v8
$ bundle config build.therubyracer --with-v8-dir=$(brew --prefix v8@3.15)

これでbundle installで解決しました

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