SU 2024, Windows, Ruby 3.2.4

The current release of SU 2024 uses Ruby 3.2.2. Ruby 3.2.4 was released yesterday. The 3.2.2 PATCH_LEVEL is 53, the 3.2.4 PATCH_LEVEL is 170. That represents 117 updates between the two.

On Windows, one can make a copy of the SU 2024 folder, and the Ruby install can be replaced in the copy. They both share the extensions folder. It isn’t a good idea to run both at the same time.

If anyone would like to try Windows Ruby 3.2.4, a zip file is available at:
ruby-mswin-su-3.2.4.zip

The file is a stand-alone Ruby, which can also be copied into the correct SketchUp folders.

I believe I have a PowerShell script to copy the updated Ruby files into the ‘copied’ SU folder. If people would like that, maybe give this post a like and I’ll see if I can find/update it and post it.

As to the 3.2.4 build, it was built using VS 2022, with packages from Microsoft/vcpkg. Note that it is using OpenSSL 3.3.0, which hopefully will be included in the next release of SU. The OpenSSL version in SU 2024 is 1.1.1, which is ‘end-of-life’, but is still supported by some OS’s (Ubuntu 20.04).

It was built using the code from MSP-Greg/ruby-loco, which provides Windows Ruby master builds for use in GitHub Actions.

1 Like

Where exactly is the folder for the ruby installation on Windows?

I didn’t write the clearest post. Sorry for that.

There’s two concepts here:

  1. A stand-alone Ruby that is very similar to the Ruby used in SU 2024, with the exception of the OpenSSL version. If you’re not needing to compile any C/C++ source code using OpenSSL, that change should not affect most extension code.

  2. Making a copy of your SU 2024 install, and updating the Ruby install in the copy. To do that, one either needs to be familiar with the location of all the Ruby files in SketchUp, or I need to find the PowerShell file that automates the copying of files from the extracted zip file to the copy of SketchUp…

Are you interested in the second concept? Regardless, I’ll look for that ps1 script…

EDIT: I found the ps1 file, so I’ll update it, verify that it works, and post it and full instructions on GitHub. I’ve already got a copy of SU 2024 running Ruby 3.2.4.

That’s interesting. I thought the developers patched a few things in the Ruby interpreter to make it play nice within SketchUp. Let us know if you encounter any strange crashes or other misbehavior!

Thanks.

No crashes, etc. I’m pretty familiar with stand-alone Ruby. Sometime (hopefully soon), I’ll investigate doing the same on macOS.

This leaves people’s existing SU install untouched.

Maybe this can provide feedback about the update to help Trimble/SketchUp in planning for future SU releases…

1 Like

Instructions are located at this link.

I’ve updated the Ruby zip file shown above, adding some logic to two files to allow them to function both in stand-alone Ruby and SketchUp.

You’ll need PowerShell (I’m using PowerShell 7.4.2). I did this on Windows 11, I suspect it should run fine on Windows 10 also, but I can’t test on that. You can add shortcuts to the Sketchup.exe file in the new folder, etc.

As to OpenSSL 3.3.0, most stand-alone Ruby programs ran just fine using it. Or, I don’t think the net/http gem needed any changes for OpenSSL 3.3.0. There are some differences in Ruby OpenSSL, but most of those deal with cryptography issues that I doubt any SU extensions are making use of.

So, feel free to post if you have any issues.

1 Like

I haven’t mentioned the original reason I started building stand-alone Rubies that matched SU’s Ruby install. After I had built them, I then realized that they could be pushed into a SU install, assuming the Ruby versions were compatible.

The original reason I created the builds is that SU 2021 and later use a Ruby build that’s built with different compiler tools/packages than the standard ‘publicly available’ stand-alone Rubies. So, I built it to allow installing extension gems that would work with SU.

I can provide more info if people are interested in experimenting with that…