Error Installing Libv8: Error: Failed to Build Gem Native Extension

Error installing libv8: ERROR: Failed to build gem native extension

try this one:

gem install libv8 -v '3.16.14.3' -- --with-system-v8

Note : Because libv8 is the interface for the V8 engine used by therubyracer,
you may need to use libv8, even if you have V8 installed already. If
you wish to use your own V8 installation, rather than have it built
for you, use the --with-system-v8 option.

For more you can go through the documentation of libv8 on github

OpenBSD unable to install therubyracer gem ERROR: Failed to build gem native extension

I was unable to install therubyracer gem in OpenBSD. As a workaround, I replaced it with the nodejs javascript runtime:

gem 'node'

Make sure to remove the gem 'therubyracer' line.

Can't install libv8 gem on Cygwin

Since your question mentioned Cygwin, I assume you are Windows user. Currently, there's no way to install therubyracer or libv8 in Windows as said by its maintainer: therubyracer gem on windows. Windows is not Rails land unfortunately.

If you do need libv8, you can try nodejs instead. It comes with a binary, handy for all platform.

therubyracer - Gem::Ext::BuildError: ERROR: Failed to build gem native extension

This steps worked for me.

OS: Maverick
Ruby: 2.1.1

gem uninstall libv8
gem install therubyracer -v '0.11.3'
gem install libv8 -v '3.11.8.13' -- --with-system-v8


Related Topics



Leave a reply



Submit