How to pack my file as rbz?

I searched for packing ruby extensions in developer center:

Packaged properly as an RBZ Archive: RBZ files are nothing more than ZIP archives of ruby scripts and other assets with a particular, internal folder structure. More on that below.

Does this mean that I could just packed as .zip and rename it as .rbz? and should I just pack my .rb file only, if only ruby file is needed?

Basically, yes. Just be careful and check whether your zip program maintains the directory/folder structure if you have subdirectories. Sometimes that’s the default, but if it isn’t you may end up with all your files ‘loose’ in the zip file, which isn’t usually what you want.

thank you john. I’m gonna give it a try to install in on another computer.


You should follow the instructions in the “Technical Requirements” section, subpart labeled “Packaging”.

Make a .ZIP file of your Extension.
Rename it with a .RBZ file-type suffix.

This archive should consist of two parts - the RB ‘loader’ file and a subfolder using the same name as the RB file.

Although the loader RB that is all that is required for the minimal ‘plugin’ [see below re EWH] - for ‘signing’, the same-name subfolder is needed, even if it’s initially empty - but in most Extensions it usually contains the main code RB files that run the tool, and other supporting files or subfolders of files [like images, HTML etc].
If you submit your RBZ for file for signing, then the special files ‘signature’ files are added to thar subfolder.
It cannot be signed unless the two RB/subfolder parts are correctly formed - no more, no less.
On signing your RBZ through the portal you can choose to leave the subfolder’s files as RB, or encrypt them as the more secure RBE format [or the alternative RBS format, for backwards SketchUp-version compatibility - but of course that is then with limited easily-hackable-obfuscation].

If you propose to submit to the EWH there are stricter rules about files and their syntax etc…
It that case the loader RB must do little more that set up the Extension, then its subfolder must contain all of the other main RB files needed to make your tool work. Any RB files in the subfolder are auto-converted to RBE etc as you choose when submitting…