Skip to content

OpenStudio API in Widnows

muh182 edited this page Oct 2, 2014 · 11 revisions

Run Ruby Scripts in Windows Command Line

Note: The instructions used in this study is valid for the OpenStudio 1.4.0 or older.

It is important to note that this is installation is very tricky. If the instructions are not followed carefully, you will receive error message because of the OpenSSL. There are some discussions on the OpenStudio forum.

  • Step 1: Install the ruby installer:
    1. Although the OpenStudio page recommended the 1.8.6 ruby installer, rubyinstaller-1.8.7-p370 works better.
    2. OpenStudio Recommendation: Install the ruby (1.8.6) from the following link:
    3. Ruby: MSVC Ruby 1.8.6 - This MSVC build of Ruby is required to build OpenStudio. To install, unzip to C:\Ruby or other desired location.
    4. During the installation, make sure to check the “add ruby executables to your path” and “associate .rb and .rbw files with this ruby installation” (Note: This will add the ruby folder to the path)

ruby187 installation in windows

  • Step 2: Open the \lib\ruby\site_ruby folder in the ruby folder and search for the openstudio.rb file (For example, for my computer, the path is C:\Ruby187\lib\ruby\site_ruby). If you cannot find the file, create a openstudio.rb file and point out to the ruby bindings (For example, for my computer the text in the file is require "C:\Program Files (x86)\OpenStudio 1.3.0\Ruby\openstudio.rb").

  • Step 3: There is no need to add any other paths to the environmental variables. Otherwise, the conflict between the OpenSSL will cause error message.