portable ruby 1.9.2
I 开发者_如何转开发tried to make a portable(small sized) Ruby(1.9.2) that I can save in my repository, so whenever developer checked out the source code, they can build the code with Rake without having Ruby installed.
AllInOneRuby works with Ruby version 1.8.7, but doesn't work with ver 1.9.2.
from the comment at running-ruby-and-rake-and-albacore-without-installing-them ; Alexander Groß managed to make 2.7 MB stripped down portable Ruby/Rake, but I cannot find how he did it.
Do you have a way to make a small sized portable ruby.
Thanks
I've heard that using JRuby, you can compile code down to jar files, so if your users have Java installed, it might be the way to go.
I don't know how well JRuby supports 1.9.2, however.
This is my solution:
- copy Ruby folder to my build folder
- delete the doc folder
- zip the bin, include, lib, share directory
- commit the zip files to repository; ignore the zip the bin, include, lib, share
- create rake.bat/ruby.bat that point to the real files.
now whenever developer want to build: 1. just unzip the files. 2. run my rake script.
uncompressed: 1,333 files - 192 folders - 26.7 mb
compressed : 8.14 Mb
精彩评论