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

Revision history [back]

click to hide/show revision 1
initial version

loading an external gem in a measure

I'm trying to solve a problem that has occurred when updating to version 2.1 of OpenStudio. I did not have this problem in the 1.11.x versions of OpenStudio. I'm sure that it is an issue with how my Ruby environment is set up. I am running on a *nix enviroment (in this case, Mac).

The actual gem I am trying to use is the mongo gem, so in my ruby measure I have a simple require statement at the top require 'mongo'

When I load the measure in OpenStudio, the measure shows the red broken scroll, and the message 'cannot load such file -- mongo'

I use RVM to manage my ruby environment. I've double checked to ensure that both gem folders under ~/.rvm for both ruby versions on my machine (2.0.0 and 2.2.0), to ensure there is a mongo folder in there. But, regardless, even if I reboot my machine, restart OpenStudio, I still see the same message and same broken red scroll.

Are there any tricks to try and solve this, e.g. - rvm pristine or a different way to configure ~/.bashrc ?

loading an external gem in a measure

I'm trying to solve a problem that has occurred when updating to version 2.1 of OpenStudio. I did not have this problem in the 1.11.x versions of OpenStudio. I'm sure that it is an issue with how my Ruby environment is set up. I am running on a *nix enviroment (in this case, Mac).

The actual gem I am trying to use is the mongo gem, so in my ruby measure I have a simple require statement at the top require 'mongo'

When I load the measure in OpenStudio, the measure shows the red broken scroll, and the message 'cannot load such file -- mongo'

I use RVM to manage my ruby environment. I've double checked to ensure that both gem folders under ~/.rvm for both ruby versions on my machine (2.0.0 and 2.2.0), to ensure there is a mongo folder in there. But, regardless, even if I reboot my machine, restart OpenStudio, I still see the same message and same broken red scroll.

Are there any tricks to try and solve this, e.g. - rvm pristine or a different way to configure ~/.bashrc ?