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

Revision history [back]

If you want to use OpenStudio's ruby API outside of our GUI's you need to tell your system ruby where to find OpenStudio.

Create a file with this content.

require 'C:\Program Files\OpenStudio 1.7.0\Ruby\openstudio.rb'

Place it in your system ruby's site folder at a path similar to this.

C:\Ruby200\lib\ruby\site_ruby\openstudio.rb

Also, the openstudio gem isn't something you should typically use. You just need OpenStudio installed, and optionally ruby (you can use your system ruby, or you can use OpenStudio's installed ruby).

If you want to use OpenStudio's ruby API outside of our GUI's you need to tell your system ruby where to find OpenStudio.

Create a file with this content.

require 'C:\Program Files\OpenStudio 1.7.0\Ruby\openstudio.rb'

Place it in your system ruby's site folder at a path similar to this.

C:\Ruby200\lib\ruby\site_ruby\openstudio.rb

Also, the openstudio gem isn't something you should typically use. You just need OpenStudio installed, and optionally ruby (you can use your system ruby, or you can use OpenStudio's installed ruby).

Update: Just found this described in more detail in the measure testing section of our measure writing guide.