Add on Heroku add-ons
https://elements.heroku.com/addons/rollbar
Install Gem
Add this line to your application's Gemfile:
gem 'rollbar'$ bundle install
For generate config/initializers/rollbar.rb:
rails generate rollbar <TOKEN>
Use the free Deploy Hook addon from Heroku. Run this command to add it to your Heroku app:
heroku addons:create deployhooks:http --url="https://api.rollbar.com/api/1/deploy/?access_token=<TOKEN>&environment=staging" --app name-app
Note that this includes your Rollbar project access token and the environment name "production"; edit these to your needs.
If you already have an HTTP deploy hook set up, you'll need to remove it first:
heroku addons:destroy deployhooks:http