Recently, I need to move some Rails projects I was working on to new computer and this needs me to install all the dependencies for these projects. While using bundler to install the gems; I encountered the following error:
extconf failed, exit code 1 Gem files will remain installed in /Users/ash/.rvm/gems/ruby-2.2.1/gems/libv8-220.127.116.11 for inspection. Results logged to /Users/ash/.rvm/gems/ruby-2.2.1/extensions/x86_64-darwin-14/2.2.0-static/libv8-18.104.22.168/gem_make.out An error occurred while installing libv8 (22.214.171.124), and Bundler cannot continue. Make sure that `gem install libv8 -v '126.96.36.199'` succeeds before bundling.
Fortunately, with homebrew fixing this (on OSX 10.11, El Capitan at least) worked perfectly. Simply execute these commands:
brew install v8 gem install therubyracer gem install libv8 -v '188.8.131.52' -- --with-system-v8