• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Best practices for creating an rbe

Scheduled Pinned Locked Moved Developers' Forum
4 Posts 2 Posters 7.2k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    Frankn
    last edited by 14 Dec 2021, 19:25

    I've been trying to get a plugin signed and running into some issues which seem to be related with require... I get these errors...
    @unknownuser said:

    Error: #<LoadError: cannot load such file
    .

    I found this post https://forums.sketchup.com/t/cant-load-required-rb/42755/3 where Dan uploaded some templates but I'm not sure how the
    @unknownuser said:

    MultiClass_MultiFile.zip
    works. Does anyone have a sample code that I can look at or can someone please explain how those files should be structured and how they work together?

    Frank

    1 Reply Last reply Reply Quote 0
    • D Offline
      Dan Rathbun
      last edited by 15 Dec 2021, 16:13


      If you are having issues with Trimble's signing portal, then the best place to ask is:

      • SketchUp forums: Developers > Extension Warehouse for Developers
        .. or the main developers forum:

      • SketchUp forums: Developers

      ThomThom And Julia monitor those forum categories and should be quick to answer (if the question and answer has not already been posted previously, which might often be the case.)

      Also see newer help pages:

      • Developing Extensions for Extension Warehouse

      • Extension Signing and Encryption

      • Extension Development Best Practices


      That said, the Ruby core Kernel#require method cannot load scrambled ( rbs) or encrypted ( rbe) files.

      You must use the API's Sketchup::require module method andyou need to omit the file extension ( .rb, .rbs or .rbe) when you call the SketchupExtension::new class constructor in your extension registrar script.

      I'm not here much anymore.

      1 Reply Last reply Reply Quote 0
      • F Offline
        Frankn
        last edited by 15 Dec 2021, 16:45

        Thanks for the info Dan... I'll check out those forums. I wasn't even aware that the Sketchup API had it's own require method and it explains why I'm having problems. I guess I have some more learning and reading to do! 😄

        1 Reply Last reply Reply Quote 0
        • F Offline
          Frankn
          last edited by 16 Dec 2021, 00:56

          Where can I find info and/or examples on how to set this part of the loader file? I'm searching but not finding anything...

          require "Author_MultiClassPlugin/MultiClassPlugin_SharedConstants.rb"
          
          include SharedConstants # mixin the constant module
          

          And this from the SharedConstants file?

          SOME_SEARCH_PATTERN ||= /^Author/
          

          Thanks

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          1 / 1
          • First post
            1/4
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement