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

Building Sync Gem Error

asked 2022-08-29 11:34:42 -0600

OH.AME2021's avatar

updated 2022-08-30 09:00:19 -0600

Greetings, I successfully installed the gem and I'm trying to run the example files.

Here's how things look in my Terminal.

user@mac ~ % cd /Users/user/Downloads/BuildingSync-gem-examples-develop
user@mac BuildingSync-gem-examples-develop % bundle exec ruby run_L000.rb
Traceback (most recent call last):
5: from run_L000.rb:1:in `<main>'
4: from run_L000.rb:1:in `require'
3: from /Users/user/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/buildingsync-0.2.0/lib/buildingsync/translator.rb:42:in `<top (required)>'
2: from /Users/user/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/buildingsync-0.2.0/lib/buildingsync/translator.rb:42:in `require_relative'
1: from /Users/user/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/buildingsync-0.2.0/lib/buildingsync/model_articulation/spatial_element.rb:39:in `<top (required)>'
/Users/user/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/buildingsync-0.2.0/lib/buildingsync/model_articulation/spatial_element.rb:39:in `require': **cannot load such file -- openstudio (LoadError)**

Is this an issue in my usage? Is it something wrong with the gem? This error also appeared when I tried my own files. It seems it's not getting past the 'require' line. Any information will help, thanks!

edit retag flag offensive close merge delete


Are you using the correct version of Ruby?

Luis Lara's avatar Luis Lara  ( 2022-08-29 16:15:21 -0600 )edit

Yes I'm using 2.5.0 as required I believe.

OH.AME2021's avatar OH.AME2021  ( 2022-08-30 08:33:09 -0600 )edit

@Long any ideas for this error loading openstudio while using the BuildingSync gem?

Aaron Boranian's avatar Aaron Boranian  ( 2022-08-30 09:01:24 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2022-08-30 09:07:10 -0600

If you go into interactive Ruby (IRB) from the terminal (on mac type irb and enter), and then type require 'openstudio' and enter does it return true? If not then your system ruby needs to be told where to find OpenStudio. On mac I doo this in .bash file by adding a line that looks like export RUBYLIB="/Applications/OpenStudio-3.4.0/Ruby":$RUBYLIB

edit flag offensive delete link more


Thanks David this fixed the problem

OH.AME2021's avatar OH.AME2021  ( 2022-08-31 11:37:35 -0600 )edit

Glad that worked.

David Goldwasser's avatar David Goldwasser  ( 2022-08-31 12:31:53 -0600 )edit

Your Answer

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

Add Answer


Question Tools

1 follower


Asked: 2022-08-29 11:34:42 -0600

Seen: 120 times

Last updated: Aug 31 '22