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

Revision history [back]

For the sake of using the official documentation out there, specifically the "Getting Started" tutorial:

Optional - Install Ruby If you plan to use the OpenStudio SDK Ruby bindings via command prompt on Windows, you must install Ruby. OS X already has Ruby installed.

Download the Ruby 2.0.0 installer. If you have the Windows (x64) version of OpenStudio (Help>About>Compiler shows Visual Studio 12 2013 Win64), you'll need the x64 Ruby installer. If you have the Windows (x32) version of OpenStudio, you'll need the non-x64 Ruby installer.
Add `C:\Ruby200\bin` (or wherever you installed Ruby) to the PATH environment variable. Detailed instructions.

Create a text file with the following text inside:

`require 'C:\Program Files (x86)\OpenStudio 1.7.0\Ruby\openstudio.rb'`

Save the file as `openstudio.rb` here: `C:\Ruby200\lib\ruby\site_ruby\openstudio.rb` (next to the 2.0.0 folder).
Test your installation by opening a command prompt and typing: irb ENTER. Then, type require 'openstudio ENTER. If you see some QSslSocket messages and => true, it's working.

I personally have several of these files in there, usually two: openstudio.rb which points to the latest stable release, and openstudio-rc.rb which points to a release candidate. This way I can require any of these two as needed.

For the sake of using the official documentation out there, specifically the "Getting Started" tutorial:

Optional - Install Ruby If you plan to use the OpenStudio SDK Ruby bindings via command prompt on Windows, you must install Ruby. OS X already has Ruby installed.

installed.

Download the Ruby 2.0.0 installer. If you have the Windows (x64) version of OpenStudio (Help>About>Compiler shows Visual Studio 12 2013 Win64), you'll need the x64 Ruby installer. If you have the Windows (x32) version of OpenStudio, you'll need the non-x64 Ruby installer.
Add `C:\Ruby200\bin` (or wherever you installed Ruby) to the PATH environment variable. Detailed instructions.

Create a text file with the following text inside:

`require 'C:\Program Files (x86)\OpenStudio 1.7.0\Ruby\openstudio.rb'`

Save the file as `openstudio.rb` here: `C:\Ruby200\lib\ruby\site_ruby\openstudio.rb` (next to the 2.0.0 folder).
Test your installation by opening a command prompt and typing: irb ENTER. Then, type require 'openstudio ENTER. If you see some QSslSocket messages and => true, it's working.

I personally have several of these files in there, usually two: openstudio.rb which points to the latest stable release, and openstudio-rc.rb which points to a release candidate. This way I can require any of these two as needed.