How to fix libv8 “bad version” error when using mini_racer

Photo by Sarah Kilian on Unsplash

TL;DR

Run bundle update mini_racer

I’ve been dealing with issues on my Mac for a while, so yesterday I decided to give in and wipe it. I upgraded to MacOS Catalina, then wiped my partition and did a fresh install.

In a few hours, I had almost everything running. Today, I tried to run bundle install to setup a Rails project's dependencies and I was greeted by this:

There are two important lines here:

Error: failed to resolve package version (line 5): bad version (not an instance ID, a ref or a tag): “M56jPzDv1620Rnm__jTMYS62Zi8rxHVq7yw0qeBFEgkC”.

and

/Users/brandoncc/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/libv8–6.7.288.46.1/ext/libv8/builder.rb:79:in `block in setup_build_deps!’: unable to fetch v8 source (RuntimeError)

I tried every solution I could find for libv8 not compiling on a Mac. Most of them looked a lot like this one:

Nothing I did resolved my issue…until I found my way to this comment, which made me wonder if mini_racer needed to be updated in order to be compatible with MacOS Catalina.

I ran bundle update mini_racer, and sure enough... my bundle installed!

Thanks for stopping by, I really hope this helped you!

Originally published at https://brandoncc.dev.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store