I have created a script that uses the gsl gem. Because this is a native gems and it cannot be installed in SketchUp I created a self contained executable in Windows 10 with ocra. I am using Ruby 2.7.2 installed with rubyinstaller
and all the various packages installed with msys
and pacman
The executable works perfectly when launched from the Windows command line (even in a completely fresh installation), but when launched from the Ruby console in Sketchup or from a script, it fails.
If you want to test it, this is the script (no code, just the require
statements)
require "tmpdir"
require "json"
require "gsl"
and this is the actual executable (zipped) generated by ocra and this is the actual folder it creates
I have tried with backticks, Open3
, exec
, system
and I always get the same results
rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- gsl (LoadError)
TBH, I am not sure it is a SketchUp related issue, but because it does work from a normal console it makes me think that it could be related to how SU handles the execution of shell commands.
Any suggestion or idea? This is above my pay grade
I am moving all the calculations to the cloud, but this is a bit urgent because of a new customerâs request and this approach âseemedâ the quickest.
groundtest.exe.zip (6.5 MB)
ocr2BE.tmp.zip (10.9 MB)