Skip to content

Instantly share code, notes, and snippets.

@sokhasen
Last active June 10, 2020 20:09
Show Gist options
  • Save sokhasen/f009cc5ae3f7b0b3ada9be99b1379aba to your computer and use it in GitHub Desktop.
Save sokhasen/f009cc5ae3f7b0b3ada9be99b1379aba to your computer and use it in GitHub Desktop.
Rails Fixed Bundle installing therubyracer & libv8 Error on Catalina
Error Logs:
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.
In Gemfile:
therubyracer was resolved to 0.12.3, which depends on
libv8
--------------------------------------------------------------------------------------
Fixed Commands
$ 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
@edwinmeyer
Copy link

Thank you very much for posting this, Sok Hasen. It worked for me after several fruitless days of trying every which thing. Billy Kong's otherwise informative post https://billykong.github.io/ruby/2020/03/17/fixing-libv8-in-osx-catalina.html had simillar information, but still did not work for me. I think the difference is that while Billy's post uses gem installs, your directions set up configuration, then perform the installs as part of the bundle install command.
FWIW (For What it's Worth): I'm running Xcode 11.4.1 on Mac Catalina 10.15.4.

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