OK, I’m at the end of my tether with this. There are a few similar questions but they all refer to therubyracer 0.10, and they mostly conclude that the problem can be fixed by u
OK, so this is now sorted.
For future people with the same problem, I was suffering from having ruby built against a previous installation of OS X.
Fixed by completely nuking rvm and starting from scratch, though I imagine you could just uninstall/reinstall the offending ruby.
More details on how the problem was solved here:
https://github.com/cowboyd/libv8/issues/120