Skip to content

Instantly share code, notes, and snippets.

@fernandoaleman
Created May 5, 2016 15:14
Show Gist options
  • Save fernandoaleman/868b64cd60ab2d51ab24e7bf384da1ca to your computer and use it in GitHub Desktop.
Save fernandoaleman/868b64cd60ab2d51ab24e7bf384da1ca to your computer and use it in GitHub Desktop.
Fixing libv8 and therubyracer on Mac
brew tap homebrew/versions
brew install v8-315
gem install libv8 -v '3.16.14.13' -- --with-system-v8
gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315
bundle install
@gamesover
Copy link

if someone is using mini_racer 0.3.0 or below, please upgrade to gem 'mini_racer', '0.6.2' and comment out libv8

trust me, it will save you hours of dev config time

@srfinkel
Copy link

Much thanks @gamesover This was the perfect fix for Monterey 12.4 on a M1.

if someone is using mini_racer 0.3.0 or below, please upgrade to gem 'mini_racer', '0.6.2' and comment out libv8

trust me, it will save you hours of dev config time

@mrcsporto
Copy link

Still not working on [email protected] the only way out is reverting to ruby 3.0.4

@AteqEjaz
Copy link

AteqEjaz commented Oct 6, 2022

Comment out Following 2 Gems from Gemfile

1: g em 'libv8'
2: gem 'therubyracer'

Add following Gem

gem 'mini_racer'

bundle install

Should work as suggested by @srfinkel

@vinit-mudgundi
Copy link

Still not working on [email protected], any solutions??

@jotolo
Copy link

jotolo commented Jan 29, 2023

Not working on [email protected] yet

@curve-jyothish
Copy link

bundle config build.therubyracer --with-v8-dir=$(brew --prefix [email protected])

Thanks. Worked for me too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment