An experimental method of packaging a Ruby project into a single file archive, which is extracted and run on the destination machine.
Zero dependencies outside of stdlib.
Will this work for many projects? Maybe. Will it work for all projects? Doubtful. Will I maintain it? Unsure.
Inspired by this Ruby bug tracker issue.
$ gem install rbz
Generate an archive from a folder of Ruby files. There must be a file in the
root of the folder called main.rb, which will be the entry point to the application.
$ rbz <folder with ruby files> > my-archive.rbz
Once the archive is generated, run it with ruby.
$ ruby my-archive.rbz
If your application's Gemfile is simple (ie. no git or path sources, no C extensions) there is a good chance you can package it with rbz.
rbz uses bundle install --standalone to vendor your dependencies, and then writes
out it's own loader that sets up the load path to use those vendored gems.
The gem is available as open source under the terms of the MIT License.