Documentation

Check out our guides and API reference documentation on how to use Rollbar to monitor, debug, and triage errors.

Guides & SDKs    API Reference

Capistrano

Report deploys to Rollbar from Capistrano

Capistrano 3

Add to your Gemfile:

gem 'rollbar', '~>2.0'

Add to your Capfile:

require 'rollbar/capistrano3'

Add to your deploy.rb:

set :rollbar_token, 'POST_SERVER_ITEM_ACCESS_TOKEN'
set :rollbar_env, Proc.new { fetch :stage }
set :rollbar_role, Proc.new { :app }

NOTE: We've seen problems with Capistrano version `3.0.x` where the revision reported is incorrect. Version `3.1.0` and higher works correctly.

Capistrano 2

Add to your Gemfile:

gem 'rollbar', '~>2.0'

Add to your deploy.rb:

require 'rollbar/capistrano'
set :rollbar_token, 'POST_SERVER_ITEM_ACCESS_TOKEN'

Available options:

  • rollbar_token
    The same project access token as you used for the rails generate rollbar command; find it in config/initializers/rollbar.rb. (It's repeated here for performance reasons, so the rails environment doesn't have to be initialized.)

  • rollbar_env
    Deploy environment name. Default: rails_env

Capistrano Multistage

For capistrano/multistage, try:

set(:rollbar_env) { stage }

Updated about a year ago

Capistrano


Report deploys to Rollbar from Capistrano

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.