I have a mod_rails server where disk space, oddly enough, is at a premium. Is there a way for me to compress my application’s source, like Python’s zipimport?
There are obvious disadvantages to this, so I should probably just break down and spend a nickel on disk space, but I figured it’d be worth a shot.
Oh, this is neat. Check out the rubyzip gem:
(Update: The ziprequire.rb is no longer present in the rubyzip gem, but the source link appears to contain its old content nonetheless.)
Like so. This is just slightly modified from their example:
You don’t have to use the rubyzip library to create the zipped library, of course. You can use CLI zip for that.