Can not run file.rbz after signing & encrypting (SOLVED)

Hello, I’m a new member of the SketchUp development forum. I have a problem with my ruby. I created a rbz file and I uploaded it to encrypt rb files. However, it did not work although it worked well before encrypting. The ruby console said:

" Extension Errors Report
SketchUp: 24.0.594
OS: Windows 11
Ruby: 3.2.2

Extension: Boc Quick Align (1.0.0)
Error: LoadError (cannot load such file – c:/users/azpc/appdata/roaming/sketchup/sketchup 2024/sketchup/plugins/boc_align/BocAlignTools_AlignToTop)
<internal:C:/Program Files/SketchUp/SketchUp 2024/Tools/RubyStdLib/rubygems/core_ext/kernel_require.rb>:85:in require’
<internal:C:/Program Files/SketchUp/SketchUp 2024/Tools/RubyStdLib/rubygems/core_ext/kernel_require.rb>:85:in require’
c:/users/azpc/appdata/roaming/sketchup/sketchup 2024/sketchup/plugins/boc_align/loader_boc_align.rbe:2:in ’
C:/Program Files/SketchUp/SketchUp 2024/Tools/extensions.rb:197:in eval’
C:/Program Files/SketchUp/SketchUp 2024/Tools/extensions.rb:197:in require’
C:/Program Files/SketchUp/SketchUp 2024/Tools/extensions.rb:197:in load’
C:/Users/AZPC/AppData/Roaming/SketchUp/SketchUp 2024/SketchUp/Plugins/boc_align.rb:21:in register_extension’
C:/Users/AZPC/AppData/Roaming/SketchUp/SketchUp 2024/SketchUp/Plugins/boc_align.rb:21:in module:Align
C:/Users/AZPC/AppData/Roaming/SketchUp/SketchUp 2024/SketchUp/Plugins/boc_align.rb:4:in module:BOCSTUDIO
C:/Users/AZPC/AppData/Roaming/SketchUp/SketchUp 2024/SketchUp/Plugins/boc_align.rb:3:in <top (required)>'"

I have attached an image so that you guys can understand my case.
I appreciate any help you can provide.

Your problem is that when you receive the encripted rbz your files change from .rb to .rbe so your require points to a wrong file.
Use something like this:

Sketchup.require(File.join(__dir__, '/yourfilename'))
1 Like

And…
Please update your profile. Clearly you are not using SketchUp for Schools

Your direction is correct. The problem has been solved. Thank you so much.

Please mark the post as solved