Error on require function


Each time i use the line "require ‘racc/parser.rb’ " i have an error :

Error: #<LoadError: cannot load such file -- racc/parser.rb>
C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/rubygems/core_ext/kernel_require.rb:59:in `require'
C:/Program Files/SketchUp/SketchUp 2019/Tools/RubyStdLib/rubygems/core_ext/kernel_require.rb:59:in `require'
<main>:in `<main>'

The problem is that this line is important to run new version of Nokogiri. I cant find a solution without download an Racc library and modify the path of this require in the code of Nokogiri. This solution is not good to deploy the plugins SketchUp and to maintain the plugins.

Did someone have an idea please ? thanks

REF … previous threads on Nokogiri:

@thomthom: For some unknown reason the "racc" directory and it’s "parser.rb" file is missing in SU2019, but present in previous version builds. (… at least on the MS Windows editions.)

Weirdly, the "platform_specific/racc" directory and it’s compiled "" (that "racc/parser.rb" loads,) is still present in SU2019’s "Tools/RubyStdLib" path.

FWIW it is present on Mac and loads fine with a require in the Ruby Console.


I believe it’s a licensing issue (LGPL)

Additionally, racc is an extension gem, and is not available pre-compiled for windows.

I could generate a pre-compiled gem on Appveyor, if that would be helpful…

That’s a good chance that’s the case. We had to prune out GPL licensed modules from the stdlib. Mostly that shouldn’t have been to much effect as it mostly appear to be related to CLI/building tools.

But I don’t recall of the top of my head if this particular one was related to that.


Hmm… thanks for pointing that out.

1 Like

This is kind of messy with the changes in stdlib over the years, etc. It seems that the licensing of racc varies within it…


GitHub ruby/racc GPL search


Odd thing is that many ‘organizations’ don’t want to include LGPL/GPL licensed code in their distributions, but as a user, I’m free to install it myself…

okay, I see they’ve removed files that had GPL license, and switched Racc from LGPL2 to the Ruby license.


1 Like