After you have downloaded the OpenStudio installer, you will want to install Ruby (2.2.4). This will allow you to execute rake tasks contained in the Rakefile. Follow the instructions below for Windows Setup or Mac Setup.
- Install Ruby (2.2.4). Follow the installation instructions here (“Optional - Install Ruby”).
gem install bundler -v 1.17.1.
If you get an error, you may have to issue the following:
gem sources -r https://rubygems.org/ followed by
gem sources -a http://rubygems.org/. If you still get an error, manually update your gem sources list by including a config file named “.gemrc” in your home directory (.e.g, /c/Users/<USERNAME>) with the following contents:
--- :backtrace: false :bulk_threshold: 1000 :sources: - http://rubygems.org :update_sources: true :verbose: true
- Download the DevKit at http://rubyinstaller.org/downloads/ (e.g., DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe). 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.
bundle installfrom the OpenStudio-BuildStock directory. (If you get an error, the problem may be that
gitis not in your
Install Homebrew if you don’t have it already.
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: /usr/local/lib/libcrypto.0.9.8.dylib /usr/local/lib/libcrypto.1.0.0.dylib /usr/local/lib/libcrypto.dylib /usr/local/lib/libklcsagt.dylib /usr/local/lib/libklcskca.dylib /usr/local/lib/libklcsnagt.dylib /usr/local/lib/libklcsrt.dylib /usr/local/lib/libklcsstd.dylib /usr/local/lib/libklcstr.dylib /usr/local/lib/libklmspack.0.1.0.dylib /usr/local/lib/libklmspack.0.dylib /usr/local/lib/libklmspack.dylib /usr/local/lib/libssl.0.9.8.dylib /usr/local/lib/libssl.1.0.0.dylib /usr/local/lib/libssl.dylib /usr/local/lib/libz.1.2.5.dylib /usr/local/lib/libz.1.2.6.dylib /usr/local/lib/libz.1.dylib /usr/local/lib/libz.dylib
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
rbenv and required dependencies.
brew install openssl libyaml libffi rbenv
rbenv by running the command below and following the instructions to add the appropriate things to your
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
echo "export RUBYLIB=/Applications/OpenStudio-2.9.0/Ruby" >> ~/.bash_profile echo "export ENERGYPLUS_EXE_PATH=\"/Applications/OpenStudio-2.9.0/EnergyPlus/energyplus-9.1.0\""
Install bundler and the libraries that bundler installs.
gem install bundler -v 1.17.1 bundle install