How to create a ruby extension "loader" file?

Recently I’m creating an RBZ plugin for Dynamic Component Library for woodworking.

When I placed the files in the sketchup plugin folder, when opening it, the message appeared that it was not possible to locate the “Loader” file.

Does anyone on the forum have a script to make available?

Note: I’m not a programmer, I’m developing this plugin for hobe.

You should install the extension with the extension manager. The own rbz file will install the extension.
By the way, how do you create the rbz, has it the right estructure?

I posted this long ago …

Addressing the question in the original post of your topic, the “loader” is the Ruby file within your extension’s folder that the “registrar” Ruby file tells SketchUp is the master to load the rest of your extension code (you will likely need to read what @DanRathbun linked to learn that terminology). You must specify a path to the loader relative to the Plugins folder when your registrar creates an instance of your extension via the #new method. If you get an error message about the loader not being found, it means that path or loader filename wasn’t correct.

It is also important to realize that the .rbz is just the standard format for distributing an extension. The Extension Manager knows how to unzip an rbz and place the registrar and your extension folder in the Plugins folder. Beyond that, there is nothing magical about the rbz. In fact, if you are just developing an extension for fun or learning, it is perfectly ok to place your registrar file and extension folder manually into Plugins (note: the unzipped files, not the rbz! Also note that other than the registrar, your Ruby files remain inside your extension folder; do not place them directly in the Plugins folder). That saves you the extra steps of re-zipping the code and running the extension manager every time you make a change. Of course, you do have to tell SketchUp to load the modified file.

Thank you very much! I will make the necessary changes that you advised me.

Exactly, I am developing this plugin for learning purposes, as I have no programming knowledge, so I always get lost in some code. The fact that I placed the file directly in the plugin folder was a way for me to notice if there were any errors in the files, in VS Code I was only able to edit the codes, but the debugging within Sketchup so I could see visually how it was going Without first packaging the files, I couldn’t do it.

It is possible to set up VSCode to debug a plugin while it is running in SketchUp. Instructions on how to do so can be found on the GitHub SketchUp site. However, getting it set up and working and then using it is somewhat technical, not something I would recommend to a novice programmer.

Do you have a specific link on the subject? I have a GitHub account, so if there is an example that I can clone from GitHub it would help me a lot. In fact, what I have learned so far is from some repository examples I saw on GitHub.