From: Jano Svitok Date: 2007-10-24T04:53:31+09:00 Subject: Re: Stripping down One-Click Ruby Installer folder for deployment On 10/23/07, Philippe Lang wrote: > This is the script I use. It strips down the c:\ruby directory from 179 > MB to 51 MB on my computer, and apparently, everything works. It is > still very big, but acceptable, especially when compressed in RAR: 14.3 > MB. > > ------------------------------------------------------------ > $OLD_PATH = 'c:\\ruby' > $NEW_PATH = 'c:\\ruby_stripped' > > require 'fileutils' > > FileUtils.rm_rf($NEW_PATH) > FileUtils.mkdir($NEW_PATH) > FileUtils.cp_r($OLD_PATH + '\\bin', $NEW_PATH + '\\bin') > FileUtils.cp_r($OLD_PATH + '\\lib', $NEW_PATH + '\\lib') > FileUtils.rm_rf($NEW_PATH + '\\lib\\ruby\\gems\\1.8\\doc') > ------------------------------------------------------------ > > If anyone is able to strip down the c:\ruby directory for deployment > even more, your help is welcome! You may try (but not I am not sure if this will work, I *guess* it will be regenerated on demand): FileUtils.rm_rf($NEW_PATH + '\\lib\\ruby\\gems\\1.8\\cache') FileUtils.rm_rf($NEW_PATH + '\\lib\\ruby\\gems\\1.8\\source_cache') If you don't plan on compiling extensions, you may remove *.lib Download spacemonger to see what are the largest files/dirs. You may strip more stuff, depending on what do you need - there's a lot of stuff for TK for example, just make sure your stuff still runs ;-)