0

Building Sync Gem Error

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!

OH.AME2021's avatar
55
OH.AME2021
asked 2022-08-29 11:34:42 -0500
Aaron Boranian's avatar
14.1k
Aaron Boranian
updated 2022-08-30 09:00:19 -0500
edit flag offensive 0 remove flag close merge delete

Comments

Are you using the correct version of Ruby?

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

Yes I'm using 2.5.0 as required I believe.

OH.AME2021's avatar OH.AME2021 (2022-08-30 08:33:09 -0500) 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 -0500) edit
add a comment see more comments

1 Answer

1

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

David Goldwasser's avatar
20.4k
David Goldwasser
answered 2022-08-30 09:07:10 -0500
edit flag offensive 0 remove flag delete link

Comments

Thanks David this fixed the problem

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

Glad that worked.

David Goldwasser's avatar David Goldwasser (2022-08-31 12:31:53 -0500) edit
add a comment see more comments