Rails gem therubyracer installation error: extconf.rb:10:in `’: Error compiling V8 (RuntimeError)

It is because of you have already the old version of therubyracer is in your project. And that version depends on a libv8 gem, thats why it is getting error so, uninstall the libv8 gem and install the therubyracer again

$ย gem uninstall libv8
$ย gem install therubyracer