Install Ruby and Ruby Development Kit
First you must install Ruby because _ib-ruby is a Ruby-based program and needs Ruby to run.
- Go to RubyInstaller for Windows.
- Under RubyInstallers, download and install one of the Ruby installers under the WITH DEVKIT list (usually the recommended/highlighted option).
- Double-click the downloaded file and proceed through the wizard to install it. Run the
ridk install
step on the last stage of the installation wizard. - Open a new command prompt window or Git Bash session.
Install the ib-api gem
At this point you should have Ruby and Rubygem on your machine.
Now use gem
to install ib-api:
gem install jekyll
Installing dependencies through Bundler
Your Project will require certain Ruby gem dependencies. These dependencies are stored in something called a Gemfile, which is packaged with the gem. You can install these dependencies through Bundler. (Although you don’t need to install Bundler for this Documentation theme, it’s a good idea to do so.)
Bundler is a package manager for RubyGems. You can use it to get all the gems (or Ruby plugins) that you need for your project.
You install Bundler by using the gem command with RubyGems:
Install Bundler
- Browse to the directory where you downloaded the Documentation theme for Jekyll.
- Delete or rename the existing
Gemfile
andGemfile.lock
files. - Install Bundler:
gem install bundler
-
Initialize Bundler:
bundle init
This will create a new Gemfile.
-
Open the Gemfile in a text editor.
Typically you can open files from the Command Prompt by just typing the filename, but because Gemfile doesn’t have a file extension, no program will automatically open it. You may need to use your File Explorer and browse to the directory, and then open the Gemfile in a text editor such as Notepad.
-
Remove the existing contents. Then paste in the following:
source "https://rubygems.org" gem 'ib-api' gem 'ib-extensions'
The wdm gem allows for the polling of the directory and rebuilding of the Jekyll site when you make changes. This gem is needed for Windows users, not Mac users.
- Save and close the file.
-
Type
bundle install
.Bundle retrieves all the needed gems and gem dependencies and downloads them to your computer. At this time, Bundle also takes a snapshot of all the gems used in your project and creates a Gemfile.lock file to store this information.
Git Clients for Windows
Although you can use the default command prompt with Windows, it’s recommended that you use Git Bash instead. The Git Bash client will allow you to run shell scripts and execute other Unix commands.