Skip to content

Instantly share code, notes, and snippets.

@nmenag
Last active May 17, 2017 16:18
Show Gist options
  • Select an option

  • Save nmenag/21f3db351cd2306951d4df7f63424725 to your computer and use it in GitHub Desktop.

Select an option

Save nmenag/21f3db351cd2306951d4df7f63424725 to your computer and use it in GitHub Desktop.
how to Install Rollbar on Heroku for a Rails project

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment