Sketchup ruby incompatible library error

Hello All,

I am very new to SketchUp development so it is probably my fault but I can not find the solution.

Please give me a hand if you can.

I have taken over a SketchUp plugin development. Te plugin works fine under the older versions of SketchUp but under SketchUp 2019 I have a strange issue.

For this latest version I use ruby 2.5.1.
It works fine under Windows and also under OSX, but only if I use the English version of SketchUp.

I haven’t tried with the Windows version yet but under OSX in case I try to load the plugin with the Spanish version of SketchUp, I get an incompatible library version error from the Ruby Console.

What can be wrong?

(The English and Spanish SketchUp both have the same version number)

Thank you in Advance!

Márton

what library is failing?

posting the error message in a code block would be helpful…

john

Hello John,

Thanks for your quick response.

Here is the console log:

Does it help?

Márton

It looks like SketchUp is failing to load something for …/Plugins/maxwell/init.rb == ../Plugins/maxwell/bin/osx/mx_r25.bundle
It might well be that the version of that was compiled for an earlier version, like v2018, and so it fails in v2019’s newer Ruby…
You need to seek advice from ‘maxwell’ direct ?
Their site says the current version v4’s compatibility is up to SketchUp v2018, for all OSs…
I suspect that you actually need v5 - whenever that’s due out ?

Hello TIG,

Yes, the mx_r25.bundle fails somehow, but this is what I would like to fix.
This was compiled by me and was compiled for SketchUp 2019. (With ruby base version 2.5.1)
And this very same version works fine under SketchUp 2019 English version, but sends this error message under the SketchUp 2019 Spanish version.

Márton

Hmm… strange. I cannot think of any reason why SU locale would make a Ruby C Extension library fail to load… because you only have one build of your binary, right?

Yes, this is the same binary, but with different results under different SketchUp languages:(…

Comparing the contents of the SketchUp.app EN and SPA versions I find many differences which are not just in the resource files but also (for example) the binary files of the Ruby.framework too.
Which is a bit surprising for me.

OK, it seems the difference is in the ruby framework.

Under the Ruby.framework/Versions/2.5.1 folder there are four files:
libruby.2.5.1.dylib
libruby.2.5.dylib
libruby.dylib
Ruby

This structure is the same under the Spanish and the English version. But under the English version the Ruby file is a binary and the other libruby.* files are practically symbolic links to this Ruby file.
But under the Spanish version there is the Ruby binary, but the libruby.* files are binaries too (not links). And these binaries are different from the Ruby file. (The Ruby files under the Spanish and English versions are very similar.)
The Maxwell plugin was linked to libruby.2.5.1.dylib and it is different under the two localized versions of SketchUp app and that caused the problem.

I can solve the problem now, but don’t understand why are these ruby files different under the two localized SketchUp versions? Any idea?

Márton

1 Like

Oh… that doesn’t sound good. I’ll pass this on internally for investigation.

1 Like

We’ve confirmed there are issues with the localized builds.

1 Like

Thank you!

Márton