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

Building Sync Gem Error

asked 2 years ago

OH.AME2021's avatar

updated 2 years ago

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!

Preview: (hide)

Comments

Are you using the correct version of Ruby?

Luis Lara's avatar Luis Lara  ( 2 years ago )

Yes I'm using 2.5.0 as required I believe.

OH.AME2021's avatar OH.AME2021  ( 2 years ago )

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

Aaron Boranian's avatar Aaron Boranian  ( 2 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 2 years ago

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

Preview: (hide)
link

Comments

Thanks David this fixed the problem

OH.AME2021's avatar OH.AME2021  ( 2 years ago )

Glad that worked.

David Goldwasser's avatar David Goldwasser  ( 2 years ago )

Your Answer

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

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 2 years ago

Seen: 159 times

Last updated: Aug 31 '22