Heroku has created a Ruby gem that makes it easy for us to take full advantage of the Platform API from Ruby. In this recipe, we'll learn how to get up and running with the gem and on our way to integrating the Heroku API with our own Ruby applications. We'll also be introduced to Pry, a super-powerful Ruby shell to execute and explore code. It will help us get up to speed and learn the Heroku API gem quickly.
To start, let's download some sample code to get familiar with the Platform API gem.
Let's open up a terminal and use Git to clone the sample code:
$ git clone https://github.com/mscoutermarsh/heroku-api-examples.git $ cd heroku-api-examples
We'll need Ruby 2.1.2 to run these examples. If we have RVM installed, we can select 2.1.2:
$ rvm use 2.1.2
Now, let's install the dependencies by running bundler:
$ bundle install