Skip to main content

Install the Ruby agent with RubyGems as a gem source

To download the Ruby agent from RubyGems:

  1. Add this to your application's gemfile:

    gem 'contrast-agent'
  2. Run an install:

    bundle install

    or an update:

    bundle update contrast-agent
  3. Configure middleware (Rails, Sinatra, or Grape).

  4. Configure the agent.

  5. Verify that autoconf is installed on the system where you will run the agent.

  6. Verify that you can see your application in Contrast.


If installing in Alpine, you may need to run the command bundle config force_ruby_platform true prior to installation.


If you only want to run with Contrast in certain environments, you can do so using the Bundler's Group function.