Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Openstudio-standards build problem

asked 2022-12-13 09:29:59 -0500

nigusse's avatar

updated 2022-12-13 15:09:04 -0500

Openstudio-standards build fails with the "rake aborted! LoadError: 126: The specified module could not be found. - C:/openstudio-3.4.0/Ruby/" error message. Below is detailed error message:

LoadError: 126: The specified module could not be found. - C:/openstudio-3.4.0/Ruby/ C:/openstudio-3.4.0/Ruby/openstudio.rb:59:in `require_relative' C:/openstudio-3.4.0/Ruby/openstudio.rb:59:in `<top (required)>' C:/Data/EGPlanetDev/OSStdsDev/openstudio-standards/data/standards/export_OpenStudio_libraries.rb:9:in `require' C:/Data/EGPlanetDev/OSStdsDev/openstudio-standards/data/standards/export_OpenStudio_libraries.rb:9:in `<top (required)>' C:/Data/EGPlanetDev/OSStdsDev/openstudio-standards/Rakefile:210:in `require' C:/Data/EGPlanetDev/OSStdsDev/openstudio-standards/Rakefile:210:in `block in <top (required)>' C:/Data/EGPlanetDev/OSStdsDev/openstudio-standards/Rakefile:209:in `<top (required)>' (See full trace by running task with --trace)

I followed the build instruction on GitHub repository correctly and I used to run build without any problem. This error message popped when I merged the latest openstudio-standard master branch into my working branch. I cannot tell what file is missing.

The build failed in Window machine. I have ruby dev-kit installed in my machine (devkit-2.5.8 and devkit-2.7.2). And I am using bundler version 2.1.4.

Any clue as to what is causing this problem or any suggestion in debugging the problem is highly appreciated.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2022-12-15 16:51:17 -0500

alebar's avatar

I ran into this same error and fixed it by installing the proper Ruby version for OpenStudio 3.4.0, which is 2.7.2 (see compatibility matrix here). You already have that version installed, so I suspect you have 2.7.2 listed after version 2.5.8 in your environmental variables path, so it's using the incorrect version.

edit flag offensive delete link more


Thanks @alebar. Infact, I did change their order but did not help me in my previous test. I will test if the order in the environment variables path matters. I always thought that the system checks the availability and picks the appropriate one.

nigusse's avatar nigusse  ( 2022-12-17 09:48:45 -0500 )edit

answered 2022-12-16 12:54:36 -0500

nigusse's avatar

Finally, I was able to build the latest openstudio-standards using Ruby version 2.7.2p137 (2020-10-01 revision 5445e04352). Below are summary of the exercises I went through in resolving the build issue I had:

  • I had two versions of Ruby DevKits (devkit-2.5.8 and devkit-2.7.2). I uninstalled and installed both ruby versions and tested it with bundler versions (2.1.0 and 2.1.4) and their dependencies, but it did not resolve my problem.

  • Then I uninstalled both ruby versions and installed Ruby version 2.5.8 only and tested with bundler versions 2.1.0 and 2.1.4. This configuration also failed to build. Note that I tried this configuration because the openstudio-standard suggests using ruby version 2.5.8 at the link here developmentInformation.

  • Finally, I uninstalled Ruby version 2.5.8, installed Ruby version 2.7.2p137 and bundler version 2.1.4, and it worked. Now, only Ruby version 2.7.2p137 resides in my computer.

I have two questions for openstudio-standards developers to comments on:

  • Maybe the latest openstudio-standards does not build using ruby version 2.5.8. Is this correct? If so, please update the development information documents for developers on github?
  • Can I have multiple versions of Ruby installed in my machine and selectively instruct the version compatible with the latest openstudio-standards source code for building the gem?


edit flag offensive delete link more


Regarding your 2nd question. There are indeed options to manage Ruby versions on Windows, including URU, all the while maintaining the same DevKit. Switched over to a Win11/WSL2/Ubuntu solution after running into (known) MSYS2 DevKit issues a few months ago. For both MacOS & Ubuntu, I manage multiple Ruby versions using rbenv - pretty smooth. Hope this helps.

Denis Bourgeois's avatar Denis Bourgeois  ( 2022-12-16 14:39:14 -0500 )edit

Thanks @Denis Bourgeois for your feedback. I will experiment your suggestion. Certainly, there are reasons to have different versions in one's machine.

nigusse's avatar nigusse  ( 2022-12-17 09:40:36 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops


Question Tools


Asked: 2022-12-13 09:29:59 -0500

Seen: 1,857 times

Last updated: Dec 16 '22