How to fix libv8 error from Gemfile on Mavericks?
Asked Answered
A

5

16

When I run bundle install I get

An error occurred while installing libv8 (3.11.8.17), and Bundler cannot continue.
Make sure that `gem install libv8 -v '3.11.8.17'` succeeds before bundling.

Libv8 is dependency for lunchy and therubyracer gems.

I have locked in my Gemfile.lock libv8 gem on 3.11.8.17

But I found that I can downgrade it to 3.3.10.4

bundle install / update: libv8 (therubyracer) installation fails (with native extensions)

How to do that?

I also found working 3.11.8.17 gem but don't know how to implement it on my system. https://github.com/cowboyd/libv8/issues/107#issuecomment-26146673

Antimonic answered 24/10, 2013 at 14:33 Comment(1)
Can you update libv8 to 3.16.14.3 and therubyracer to 0.12.0? I've seen similar issue today and bumping those gems fixed it.Jaquelinejaquelyn
R
31

You can actually install that version on Mavericks:

gem install libv8 -v 3.11.8.17 -- --with-system-v8

I can confirm this works with rbenv and ruby 1.9.3p448

See a similar thread here Installing libv8 gem on OS X 10.9+

Rosierosily answered 29/10, 2013 at 19:27 Comment(2)
worked like a charm for me. what's the long term implication of using this over homebrew? Is it going to be more difficult to maintain?Flan
Hi Nikola. Homebrew packages are getting there with Mavericks. However there are some things you can do to set up for success with your gem compilations etc. See https://mcmap.net/q/120020/-gem-install-debugger-v-39-1-5-0-39-failsRosierosily
R
14

You need to reinstall libv8

$ gem uninstall libv8
$ brew install v8
$ gem install therubyracer
Rosenbaum answered 25/10, 2013 at 1:6 Comment(0)
N
1

Try with

gem "therubyracer", "~> 0.10.2" to Gemfile

And it will install dependent gem libv8 (3.3.10.4) and the issue of build gem native extension failure got resolve.

Nw answered 7/8, 2014 at 5:33 Comment(0)
H
0

try upgrading your ruby to the highest patch level. libv8 and the rubyracer gem installed right away after I upgraded ruby-1.8.7 after going from p357 to p375.

Hittite answered 5/4, 2014 at 3:27 Comment(0)
R
0

Follow the below commands, this will solve the problem for sure:

gem install rmagick -v '2.13.2'

and then do: gem install libv8 -v 3.11.8.17 -- --with-system-v8

Redoubtable answered 5/3, 2015 at 13:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.