Ruby version

Developing on Windows, what version of Ruby should I be using with SketchUp 2022?
Ruby 3.1.3 or 3.2?

Windows Ruby installer comes in a couple of different installers, rubyinstaller & rubyinstaller-devkit
Is the -devkit installer ok to use or should I go with the standard installer?

Thanks All!

Hi,

In SketchUp 2021.1 the Ruby version was upgraded to 2.7.2

Since then I don’t see any more upgrades for Ruby so SketchUp 2022 might still be using version 2.7.2.

Here is the URL where I found the info: File: Release Notes — SketchUp Ruby API Documentation

Also, SketchUp already has a version of Ruby installed so you do not need to install Ruby manually. If you install Ruby separately then SketchUp will not acknowledge that version of Ruby and it will keep using its own version of Ruby.

4 Likes

Short answer:

  1. Open the Ruby console in SketchUp.
  2. Execute the following: puts RUBY_VERSION

and Ruby will tell you it’s version. My 2022 Pro version says 2.7.2.

Longer answer:

Ruby has (among others) the three global variables RUBY_VERSION, RUBY_RELEASE_DATE, and RUBY_PLATFORM. When I check the value of the three in SketchUp Pro 2022 I get the following:

puts RUBY_VERSION
2.7.2
=> nil
puts RUBY_RELEASE_DATE
2020-10-01
=> nil
puts RUBY_PLATFORM
x64-mswin64_140
=> nil

“Give a man a fire and he’s warm for a day, but set fire to him and he’s warm for the rest of his life.” - Sir Terry Pratchett

2 Likes