tags:

views:

48

answers:

2

Hi, 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

A: 

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.

Andrew Grimm
Yeah, you can, but you also need to include the runtime. You'll get one big jar.Also, you could get the jruby-complete jar. It also includes rake.
Geo
A: 

This is my solution:

  1. copy Ruby folder to my build folder
  2. delete the doc folder
  3. zip the bin, include, lib, share directory
  4. commit the zip files to repository; ignore the zip the bin, include, lib, share
  5. 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

kite