Install Prawn gem in SketchUp 2016

I wasn’t able to install in SU2016 either.

I was however able to installer in newer SU versions, SU2017 and SU2018.

My guess is that the rubygems version in SU2016 is too old to connect to the RubyGems repository. (I’m actually surprised there isn’t an error in that respect.)

I’m not sure if you are able to patch it, the gems system inside a desktop application is a tricky thing.

Note that the gem system isn’t something we’re supporting. There are number of issues with using it in SU.

  • We’re not able to apply patches to RubyGems for older SU versions. So whenever they make changes that require an update to RubyGems we’re stuck.
  • We’ve been struggling with OpenSSL issues over the years. Certificates getting out of date eventually, which suffer the same problem with RubyGems in that we cannot provide a patch. There’s also been bugs in Ruby that’s caused issues.
  • When OpenSSL have worked, in the current versions on Windows it can cause SU to hang/freeze for a very long time (many minutes). (This should be fixed in newer OpenSSL versions, but for that we’ll need to upgrade Ruby inside of SU)
  • If using gems for an extension you plan to publish, then you’d risk clashing with other extensions trying to use a different version of the gem.
  • Some gems require compilation, which under Windows require DevKit. This isn’t available on users machines. Nor is DevKit able to detect SketchUp’s Ruby.

Our recommendation if you want to use gems for your extension development is:

  • Use standalone Ruby (matching the versions for your target SketchUp) and install the gem there. Then you can copy the gem to your extension.
  • Make sure to wrap the gem into your own namespace so you don’t clash with other extensions. (If you only use it for your own development then you don’t need to do that step.)
1 Like