The encryption portal does the encrypting for you.
You need to properly use Sketchup.require for encrypted rbe files.
Leave the Ruby Console open and restart SketchUp. See if any errors messages appear in the console.
And please post code correctly in the forum: