How I defeated the nasty nasty nasty libv8 gem install sh#§$.
(Yosemite 10.10.3 | rbenv | ruby 2.1.2)

Before every solution step

  • remove all installed and cached gems
  • remove the ruby version you're using
  • remove the -- --with-system-v8 lines from your bundler config
  • brew uninstall v8

Solution 1:

  • brew install v8
  • cd in/your/project
  • rbenv global [YOUR PROJECT RUBY VERSION]
  • gem install libv8 [-v YOUR_VERSION] -- --with-system-v8
  • bundle config build.libv8 --with-system-v8
  • bundle install
  • done

if this doesn't work.

Solution 2:

  • download this gem
  • put it into your project folder
  • gem install libv8-
  • bundle install (you will get a libv8 error with a notice which version of libv8 is expected)
  • gem install libv8 -v [EXPECTED VERSION FROM THE ERROR]
  • bundle install
  • done

Other questions

  • brew doctor ok?
  • does it use the right ruby version? (maybe you forgot to rehash?)
  • right gem directoy is used? (not that from the system ruby or something else)

attackemartin's blog

some personal and some work related posts

Back to Overview