Installer Setup

After you have downloaded the OpenStudio installer, you will want to install Ruby. This will allow you to execute rake tasks contained in the Rakefile. Follow the instructions below for Windows Setup or Mac Setup.

Windows Setup

  1. Install Ruby, making sure to use the version compatible with OpenStudio. Add the ruby location to your PATH.
  2. Run gem install bundler. (If you get an error, you may have to issue the following: gem sources -r followed by gem sources -a
  3. Download the DevKit. Choose either the 32-bit or 64-bit version depending on which version of Ruby you installed. Run the installer and extract to a directory (e.g., C:RubyDevKit). Go to this directory, run ruby dk.rb init, modify the config.yml file as needed, and finally run ruby dk.rb install.
  4. Run bundler from the OpenStudio-BEopt directory. (If you get an error, the problem may be that git is not in your PATH.)

Mac Setup

Install Homebrew if you don’t have it already.

Run brew doctor. It should give you, among other issues, a list of unexpected dylibs that you’ll need to move for this to work such as:

Unexpected dylibs:

Highlight and copy the list (without the header “Unexpected dylibs:”). Run the following commands to move them to another location where they won’t interfere.

mkdir ~/unused_dylibs
pbpaste | xargs -t -I % mv % ~/unused_dylibs

Install rbenv and required dependencies.

brew install openssl libyaml libffi rbenv

Initialize rbenv by running the command below and following the instructions to add the appropriate things to your ~/.bash_profile.

rbenv init

Install the appropriate ruby version.

cd path/to/repo
rbenv install `cat .ruby-version`

Add the path to the install ruby libraries top the bottom of your ~/.bash_profile

echo "export RUBYLIB=/Applications/OpenStudio-2.0.5/Ruby" >> ~/.bash_profile
echo "export ENERGYPLUS_EXE_PATH=\"/Applications/OpenStudio-2.1.0/EnergyPlus/energyplus-8.7.0\""

Install bundler and the libraries that bundler installs.

gem install bundler
bundle install