Documenting my experience installing nokogiri 1.6.1 with ruby 2.1.1 on OS X mavericks
Trying to spin up a new rails 4 app,
bundle install failed on the nokogiri install, and asked that I try to install it manually first. When I’d run
gem install nokogiri -v '1.6.1' it would hang on install indefinitely.
I tried several different things like installing a different version of grep as noted in this stack overflow but that did not resolve.
It did however, compile fine when I switched to ruby 1.9.3.
gem install nokogiri -v '1.6.1' --verbose I saw it was failing here
1 2 3 4 5
So, it turns out it was installing fine, but was hanging on building the documentation, which I never use anyway. So, rerunning the command with
gem install nokogiri -v '1.6.1' --verbose --no-ri --no-rdoc worked like a charm. Not what I would call a “fix”, but at least I can sidestep the problem.
Since I never use documentation anyway, i added the following to my
~/.gemrc file which should also speed up my gem compile time: