I am running the following command on a brand new MacBook Pro with 4GB of RAM:
sudo gem install json nokogiri uglifier therubyracer -V
It shows some progress, but has been stuck at the following message for over 1.5 hours:
...
/Library/Ruby/Gems/1.8/gems/json-1.7.6/tests/test_json_unicode.rb
/Library/Ruby/Gems/1.8/gems/json-1.7.6/tests/test_json_addition.rb
/Library/Ruby/Gems/1.8/gems/json-1.7.6/tests/test_json_generate.rb
/Library/Ruby/Gems/1.8/gems/json-1.7.6/tests/test_json_encoding.rb
/Library/Ruby/Gems/1.8/gems/json-1.7.6/tests/test_json_generic_object.rb
/Library/Ruby/Gems/1.8/gems/json-1.7.6/tests/test_json.rb
Building native extensions. This could take a while...
In Activity Monitor, I see that xcrun is using 95% of the CPU and has been doing so for the entire duration and it has not completed compiling the json gem. How long does this building process take? Is there any way I can speed it up?
I resolved this by installing Xcode from the App Store (even though I had already installed Xcode command line tools) and then running Xcode.
To verify this was done correctly, run the following command:
It should show: