Following the steps here "gem install therubyracer -v '0.10.2'" on osx mavericks not installing, I was able to get therubyracer -v 0.10.2 and 0.12.0 to ins
This line appears a few times in your error message:
It is recommended to use GCC v4.4 or higher
The link to the steps you took says to run brew install apple-gcc42
, which presumably installs GCC 4.2. 4.2 is less than 4.4.
The specific error that the C source is generating seems to be:
../src/cached-powers.cc:136:18: error: unused variable 'kCachedPowersLength' [-Werror,-Wunused-const-variable]
So if you can somehow edit the makefile (or extconf.rb) to remove those flags, that might also work. However I would recommend installing a compatible compiler instead, because modifying the cflags seems a little hacky.