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

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


This steps worked for me.

OS: MaverickRuby: 2.1.1

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


For those facing this problem in OS X El Capitan, this solution from a therubyracer issue thread was what finally worked for me:

brew tap homebrew/versionsbrew install v8-315gem install libv8 -v '3.16.14.13' -- --with-system-v8gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315bundle install

I had also run brew install gcc prior, but I'm not sure whether this was in fact necessary.


Try first uninstalling libv8 gem, then install rubyracer, and then libv8

gem uninstall libv8gem install therubyracergem install libv8 -- --with-system-v8