CMake "Could NOT find Ruby (missing: Ruby_LIBRARY)" on Windows runner

Problem to solve

In my CMakeLists.txt am using:


This works on Linux runners, but on Windows runners ( saas-windows-medium-amd64) it fails with:

`CMake Error at C:/Program Files/CMake/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:230 (message):` `  Could NOT find Ruby (missing: Ruby_LIBRARY) (found suitable version` `  "3.1.3", minimum required is "2.0")` ``

Steps to reproduce




  • Self-managed
  • SaaS
  • Self-hosted Runners

Further information

FindRuby.cmake could not find Ruby library on Windows describes the same issue. Here it is caused by using RubyForWindows while FindRuby.cmake is looking for Ruby packed with Visual Studio (if I understand correctly).

I don’t know how Ruby is installed on saas-windows-medium-amd64. I just know that Ruby is installed.

If I knew under which path Ruby libs are installed on saas-windows-medium-amd64 I would be able to point CMake to its location.

Downloading RubyInstaller for Windows does not work either:

$ wget
wget : The response content cannot be parsed because the Internet Explorer engine is not available, or Internet 
Explorer's first-launch configuration is not complete. Specify the UseBasicParsing parameter and try again. 
At line:258 char:1
+ wget ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotImplemented: (:) [Invoke-WebRequest], NotSupportedException
    + FullyQualifiedErrorId : WebCmdletIEDomNotSupportedException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Is this a bug?

I summarized my findings.