Error message trying to load a plugin

Hi all !!!

I’m trying to load the ‘‘animate sections’’ plugin but i have this error message.

It happens when i have .rb instead of .rbz.

Can someone explain to me the difference ?

Thanks a lot !


An RBZ is a collection of files [actually a type of ZIP file] which SketchUp installs.
Usually there’s an RB ‘loader’ and then other similar files within its subfolder…

So the RBZ v. RB ‘issue’ is not it.

You cropped the error message just as it gets useful.

When the cmd_animate_sections.rb file loads it throws an error.
You can edit it and see what’s up - use Notepad++.exe.
In line#19 there’s an error regarding a ‘return’.
In older SketchUp’s Ruby these types of errors were ignored.
The latest version is stricter.
You can only execute a ‘return’ within a method [def].
In this file it looks like there’s one placed within a class or a module.
To fix this, edit the file and place a # in front of the line#19
Save and restart SketchUp to see if that helps.

Also contact the script’s author and firmly suggest he makes an update and republishes his code…


Seems like the extension was made with an older Ruby version that allowed return statements outside of method definitions. Ruby 2.5 is less forgiving, which I think is really a good thing as it encourages plugin developers to write better code.

If i understand well…

I quited and restarted SU and still the same message which i did not crop. it is all i can guet.



You do NOT understand.
I suggested you edited the RB file, which is in the Plugins folder - which is a text file NOT a binary file…
NEVER edit an RBZ file like that.
Undo whatever you did to it !

The RBZ is the ‘container’ which installs files.

The RB file with the error is clearly shown in the first error message you posted.
That is the file that you can try editing…

So i removed the # i put at the beginning of line #19. (Of the RBZ container may i say ?).
That was the only thing i have changed. Then put it in the ruby file (txt)

Restart SU. But still the same message. How can i recover the rest of the load error message ?

Thanks !