Rojj
November 17, 2017, 8:31pm
1
I am trying to load my plugin in SU 2017 (macos) but I keep receiving errors in the loader
file for several, but not all, require statements. The plugin is working fine in SU 2015.
The typical error is the following
Error: /users/xxxxxxx/library/application support/sketchup 2017/sketchup/plugins/mct-tools/loader.rbs:58:in `eval'
/users/xxxxxxx/library/application support/sketchup 2017/sketchup/plugins/mct-tools/loader.rbs:58:in `require'
/users/xxxxxxx/library/application support/sketchup 2017/sketchup/plugins/mct-tools/loader.rbs:58:in `<main>'
/Applications/SketchUp 2017/SketchUp.app/Contents/Resources/Content/Tools/extensions.rb:197:in `eval'
/Applications/SketchUp 2017/SketchUp.app/Contents/Resources/Content/Tools/extensions.rb:197:in `require'
/Applications/SketchUp 2017/SketchUp.app/Contents/Resources/Content/Tools/extensions.rb:197:in `load'
/Users/xxxxxxx/Library/Application Support/SketchUp 2017/SketchUp/Plugins/mct-tools.rb:20:in `register_extension'
/Users/xxxxxxx/Library/Application Support/SketchUp 2017/SketchUp/Plugins/mct-tools.rb:20:in `<module:RG>'
/Users/xxxxxxx/Library/Application Support/SketchUp 2017/SketchUp/Plugins/mct-tools.rb:4:in `<top (required)>'
All the rb
files are encrypted with the SU scrambler. AFAIK, this has not been updated since release
I require the various rbs
files with, for example, Sketchup::require File.join(RG::PLUGIN_PATH, "cfd_case")
All the require
are in the main module
I was reading that there could be some issue with the encoding, but I checked the project settings in NetBeans and the encoding is set to UTF-8
Any suggestion?
You are not showing the actual error message , just the backtrace.
And it might help to see "loader.rb"
line 58 of there about.
Rojj
November 17, 2017, 9:24pm
3
That’s the weird thing. The full message is just a repetition of what I reported. These are the first three (from top):
Error: /users/ruggiero/library/application support/sketchup 2017/sketchup/plugins/mct-tools/loader.rbs:58:in `eval'
/users/ruggiero/library/application support/sketchup 2017/sketchup/plugins/mct-tools/loader.rbs:58:in `require'
/users/ruggiero/library/application support/sketchup 2017/sketchup/plugins/mct-tools/loader.rbs:58:in `<main>'
/Applications/SketchUp 2017/SketchUp.app/Contents/Resources/Content/Tools/extensions.rb:197:in `eval'
/Applications/SketchUp 2017/SketchUp.app/Contents/Resources/Content/Tools/extensions.rb:197:in `require'
/Applications/SketchUp 2017/SketchUp.app/Contents/Resources/Content/Tools/extensions.rb:197:in `load'
/Users/ruggiero/Library/Application Support/SketchUp 2017/SketchUp/Plugins/mct-tools.rb:20:in `register_extension'
/Users/ruggiero/Library/Application Support/SketchUp 2017/SketchUp/Plugins/mct-tools.rb:20:in `<module:RG>'
/Users/ruggiero/Library/Application Support/SketchUp 2017/SketchUp/Plugins/mct-tools.rb:4:in `<top (required)>'
Error: /users/ruggiero/library/application support/sketchup 2017/sketchup/plugins/mct-tools/loader.rbs:59:in `eval'
/users/ruggiero/library/application support/sketchup 2017/sketchup/plugins/mct-tools/loader.rbs:59:in `require'
/users/ruggiero/library/application support/sketchup 2017/sketchup/plugins/mct-tools/loader.rbs:59:in `<main>'
/Applications/SketchUp 2017/SketchUp.app/Contents/Resources/Content/Tools/extensions.rb:197:in `eval'
/Applications/SketchUp 2017/SketchUp.app/Contents/Resources/Content/Tools/extensions.rb:197:in `require'
/Applications/SketchUp 2017/SketchUp.app/Contents/Resources/Content/Tools/extensions.rb:197:in `load'
/Users/ruggiero/Library/Application Support/SketchUp 2017/SketchUp/Plugins/mct-tools.rb:20:in `register_extension'
/Users/ruggiero/Library/Application Support/SketchUp 2017/SketchUp/Plugins/mct-tools.rb:20:in `<module:RG>'
/Users/ruggiero/Library/Application Support/SketchUp 2017/SketchUp/Plugins/mct-tools.rb:4:in `<top (required)>'
Error: /users/ruggiero/library/application support/sketchup 2017/sketchup/plugins/mct-tools/loader.rbs:60:in `eval'
/users/ruggiero/library/application support/sketchup 2017/sketchup/plugins/mct-tools/loader.rbs:60:in `require'
/users/ruggiero/library/application support/sketchup 2017/sketchup/plugins/mct-tools/loader.rbs:60:in `<main>'
/Applications/SketchUp 2017/SketchUp.app/Contents/Resources/Content/Tools/extensions.rb:197:in `eval'
/Applications/SketchUp 2017/SketchUp.app/Contents/Resources/Content/Tools/extensions.rb:197:in `require'
/Applications/SketchUp 2017/SketchUp.app/Contents/Resources/Content/Tools/extensions.rb:197:in `load'
/Users/ruggiero/Library/Application Support/SketchUp 2017/SketchUp/Plugins/mct-tools.rb:20:in `register_extension'
/Users/ruggiero/Library/Application Support/SketchUp 2017/SketchUp/Plugins/mct-tools.rb:20:in `<module:RG>'
/Users/ruggiero/Library/Application Support/SketchUp 2017/SketchUp/Plugins/mct-tools.rb:4:in `<top (required)>'
The corresponding lines in loader.rbs
are
58 Sketchup::require File.join(RG::PLUGIN_PATH, "cfd_case")
59 Sketchup::require File.join(RG::PLUGIN_PATH, "cfd_domain")
60 Sketchup::require File.join(RG::PLUGIN_PATH, "cfd_monitor")
Did you hand-edit those reports by any chance? Or have you tweaked the MacOs folders? I notice that the first three lines have non-standard case on folder names (all lower vs CamelCase).
Rojj
November 17, 2017, 9:44pm
5
Oh, I see what you mean. Didn’t notice. I haven’t changed anything deliberately. It’s actually the first time that I actually use 2017.
I just checked in Finder
and they are all CamelCase. Also from the Ruby console:
puts File.join(RG::PLUGIN_PATH, "cfd_case")
/Users/ruggiero/Library/Application Support/SketchUp 2017/SketchUp/Plugins/mct-tools/cfd_case
I have tried to re-install SketchUp 2017 from scratch, but the problem does not go away.
I don’t think it is an issue with the installation of SketchUp. More likely a problem with compatibility between your Ruby code and the Ruby version embedded in SketchUp 2017. As @DanRathbun requested, could you perhaps share a few lines of your loader code from around line 58?
Rojj
November 17, 2017, 10:42pm
7
It’s really a long list of require
# Additional gems
required_gems = ['net-ssh', 'net-scp', 'net-sftp', 'webrick', 'aws-sdk']
required_gems.each do |gem_name|
found_gems = Gem::Specification.find_all_by_name(gem_name)
puts "Checking gem: #{gem_name}"
if found_gems == []
Gem.install(gem_name)
end
end
require 'net/ssh'
require 'net/scp'
require 'net/sftp'
require 'aws-sdk'
Aws.use_bundled_cert!
Sketchup::require File.join(RG::PLUGIN_PATH, "utils")
Sketchup::require File.join(RG::PLUGIN_PATH, "data_field")
Sketchup::require File.join(RG::PLUGIN_PATH, "aws")
Sketchup::require File.join(RG::PLUGIN_PATH, "analysis")
Sketchup::require File.join(RG::PLUGIN_PATH, "cfd_case")
Sketchup::require File.join(RG::PLUGIN_PATH, "cfd_domain")
Sketchup::require File.join(RG::PLUGIN_PATH, "cfd_monitor")
Sketchup::require File.join(RG::PLUGIN_PATH, "colormap")
Sketchup::require File.join(RG::PLUGIN_PATH, "comfort")
.......
.......
module RG
$VERBOSE = false
@app_observer = nil
unless file_loaded?(__FILE__)
....
end
could the problem be with actual files being required and not with the loader?
Rojj
November 18, 2017, 11:33am
8
It seems to be related to the scrambling. The unscrambled version works just fine.
system
Closed
February 18, 2018, 3:33am
9
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.