Do you have Enscape loading as an extension ?*
*Somehow it’s calling LayerHelperClass from Enscape and not finding it, so I expect it’s as’s problem…
The as_rubyeditor tool seems to be throwing the error, not Ruby itself [the Console version works fine] ??
I have loaded the Enscape extension.
If you execute the code through the Console, there will be no problems.
But if you execute the code in your own extension or, for example, the Ruby Code Editor extension, you will get a NameError. This is strange because the code, in this case, has nothing to do with Enscape.
Something is looking for Enscape::LayerHelperClass
If you inspect the Constants associated with Enscape what do you see? Enscape.constants.sort
If it’s a missing constant/class/module reference it won’t appear.
So does Enscape perhaps add a layer-observer, which is faulty, calling a no-existent thing ?
The as_rubyeditor.rb appears to trigger a layer-observer onLayerAdded [line #333] which seems to trigger this weird Enscape error…
However, in as_rubyeditor’s current version v4.1 that line is nothing at line #333 but a ‘commit_operation’ ?
What version of it are you using ?
So I suspects it’s really an Enscape malformed layer-observer error issue…
You really need to contact Enscape [and warn Alex] to get to the bottom of this…
I agree. An Enscape layer observer is interfering with an operation in Alex’s console.
But, that said, because Alex’s console puts an operation around everything it executes, it can cause weird errors and situations (nesting of operations) that I find interferes with the development process (especially for newbs.) So I myself do not use it most of the time, and don’t recommend newbs use it as it “throws them off” chasing problems that will not really exist when an actual extension is loaded and run normally.
Alex’s console (and other similar web consoles) have a place as a learning tool running small snippets of code. But I feel is not well suited for development or debugging extension projects.