gem install libv8 -v '5.3.332.38.1' ... Error installing libv8: ERROR: Failed to build gem native extension
Try this (requires Homebrew):
brew install v8gem install libv8 -- --with-system-v8
For a specific version:
gem install libv8 -v '5.3.332.38.1' -- --with-system-v8
but I'm assuming the version number would need to match whatever the Homebrew formula version of v8 is.