This question already has an answer here:
I have to use nokogiri for some xml processing. For this I create a rvm gemset specific to the project and install nokogiri by gem install nokogiri. No problems this far.
But when I look into ~.rvm/gems/ruby-...@nokogiri/gems/nokogiri-.../ext/nokogiri/ and its subfolders I see files worth of 140MB in the filesystem.
Is there some generic way of removing this cruft?
That's slightly larger than what I get. I see 108MB on OS X, with the major offenders being 88MB in
ext
, 18MB inports
, 750k intest
and 520k inlib
.In
ext/nokogiri
you certainly don't need the 87MB oftmp
directory. So that's a major savings right there.Then again, you also don't need any of the source, header, or compiled files in there, either:
I'm pretty sure you don't need the
ports/archives
directory, which contains the.tar.gz
source of libxml2 and libxslt:And then there's a few megs of documentation for the libraries you can remove for sure:
You could probably pare it down further, removing things like the
test
directory. But now you've made a huge dent in the problem.