I tried it. It is very funny.
There is a nokogiri-1.10.10 directory in “c:\Users\Munka\AppData\Roaming\SketchUp\SketchUp 2021\SketchUp\Gems64\gems”
The error message is below
I tried the same procedure with nokogiri-1.10.10-x64-mingw32.gem , and it wouldn’t install, not sure why. You’re welcome to try it, but 1.11.0.rc3 should work fine.
Sorry, I just noticed this. I said to download the most recent x64-mingw32 gem. You used the x86-mingw32 gem, which is a 32 bit gem which won’t work with SketchUp…
Thank you for your help.
Yes I did what you wrote,
nokogiri-1.11.0.rc3-x64-mingw32.gem was installed succesfully.
But it does not solve my original problem. If I try to install any xlsx parser gem such as rubyXL, roo or simple_xlsx_reader all of them install nokogiri-1.10.10 gem first
then terminates because ruby.exe is not found.
What you want to do is creating a ‘perfect storm’ of issues. I could explain them later.
Anyway, when you install whatever, you need to tell RubyGems to ignore dependencies. Without reviewing code, I’m not sure how to do that with Gem.install.
Thank you for your advice.
Now we are a step ahead.
I did exactly what you suggested.
rubyXL was installed without any error however a new issue has arisen, namely a MissingSpecError.
Please find below the ruby console messages
(Please note that xlsdraw-rubyXL.rb is my own ruby script. It requires rubyXL)
text:
Error Loading File xlsDraw-rubyXL.rb
Error: #<Gem::MissingSpecError: Gem::MissingSpecError>
C:/Program Files/SketchUp/SketchUp 2021/Tools/RubyStdLib/rubygems/dependency.rb:311:in to_specs' C:/Program Files/SketchUp/SketchUp 2021/Tools/RubyStdLib/rubygems/specification.rb:1402:in block in activate_dependencies’
C:/Program Files/SketchUp/SketchUp 2021/Tools/RubyStdLib/rubygems/specification.rb:1391:in each' C:/Program Files/SketchUp/SketchUp 2021/Tools/RubyStdLib/rubygems/specification.rb:1391:in activate_dependencies’
C:/Program Files/SketchUp/SketchUp 2021/Tools/RubyStdLib/rubygems/specification.rb:1373:in activate' C:/Program Files/SketchUp/SketchUp 2021/Tools/RubyStdLib/rubygems.rb:215:in rescue in try_activate’
C:/Program Files/SketchUp/SketchUp 2021/Tools/RubyStdLib/rubygems.rb:208:in try_activate' C:/Program Files/SketchUp/SketchUp 2021/Tools/RubyStdLib/rubygems/core_ext/kernel_require.rb:161:in rescue in require’
C:/Program Files/SketchUp/SketchUp 2021/Tools/RubyStdLib/rubygems/core_ext/kernel_require.rb:156:in require' C:/Users/Munka/AppData/Roaming/SketchUp/SketchUp 2021/SketchUp/Plugins/xlsDraw-rubyXL.rb:4:in <top (required)>’
xlsDraw-rubyXL.rb is my own ruby script which is parsing xlsx files.
It is more than 2000 lines of code.
All the require statetments at the beginning
quote=
require ‘sketchup.rb’
require ‘MgyMethods.rb’ require ‘roo’
require ‘rubyXL’
require “win32ole” # just for the send_escape method
[/quote]
There is no more require statement in the whole code.
The very same code is working in SU versions 2018, 2019 and 2020.
rubyzip was installed by me at the beginning of the struggle to install rubyXL. Anyway it is reinstalled every time by rubyXL when just Gem.install ‘rubyXL’ is typed.
Try adding a rescue clause after your ‘require’ statement and inspect the exception to discover the details of the failing dependency.
begin
require ‘rubyXL’
rescue => exception
# class Gem::MissingSpecError has a custom constructor. The fields are accessed through
# the getter methods name() and requirement()
puts exception.name
puts exception.requirement
end
You may have to add diagnostic code into the rubygems files on your computer if the exception object isn’t passed back to the user code.