It might be possible - if the gem doesn’t need compiling. But there’s also issues with SSL certifies in previous SU versions. Additionally, the OpenSSL version that ships with SU’s Ruby is under Windows causing a severe performance bug eventually. As SU use more memory after loaded models there could be a freeze lasting minutes. One of the reasons we added Sketchup::Http as an alternative to Ruby’s Net::Http.
No, for several reasons:
- The broken SSL certificates in older SU versions. (Not that old, SU2014-SU2015 impacted, I think SU2016 had some issues as well.)
- The severe performance lag when initiating HTTPS request - which installing gems will trigger.
- It sets the stage for clashes with other extensions. Imagine if your extension rely on one version of a gem, but another extension rely on another incompatible version. Which version will be loaded?
Remember that the gem system was designed to be used in a single Ruby application where there is a single app author. But in SketchUp you are sharing the same environment with multiple other products.
The end user experience will not be great if your extension needs to install gems in order to operate. And it will be very prone to errors which will cause more friction for your users and cause yourself more support work.
Instead, you can repackage the gem under your own namespace and bundle it with your extension.