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-184.108.40.206 for inspection. Results logged to /Users/ash/.rvm/gems/ruby-2.2.1/extensions/x86_64-darwin-14/2.2.0-static/libv8-220.127.116.11/gem_make.out An error occurred while installing libv8 (18.104.22.168), and Bundler cannot continue. Make sure that `gem install libv8 -v '22.214.171.124'` 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 '126.96.36.199' -- --with-system-v8