Installing therubyracer 0.10.1 on OS X Mountain Lion

I was having trouble installing 0.10.1 version of therubyracer on Mountain Lion, because it depends on libv8  This is running Ruby 1.8.7.  Upgrading to 0.11 worked but that was failing on other machines too so for now we needed to stick with 0.10.1.

The solution was brilliantly documented here:

Note, if you use "sudo", but the option after the sudo:

sudo RUBYOPT=-rrubygems gem install therubyracer

Or if you just need libv8 for whatever reason:

sudo RUBYOPT=-rrubygems gem install libv8 -v ''
This is an amp-user-notification. It uses local storage to store the dismissed state.
Call Tracking test with extra params: 800-123-4567