❮ Back to FAQ

Ruby Setup

How do I install Scout APM for Ruby on Rails?

Installation takes three steps:

  1. Add the gem to your Gemfile:
gem 'scout_apm'
  1. Run bundle install:
bundle install
  1. Download your customized config file from the Scout UI and place it at config/scout_apm.yml, then deploy.

Data typically appears in the Scout UI within five minutes of deployment.

How do I use Scout APM locally in development?

Follow the same installation steps, but set monitor: true under the development environment in your config/scout_apm.yml. Consider using a different app name to keep development data separate:

development:
  <<: *defaults
  monitor: true
  name: My App (development)

How do I configure Scout on Heroku?

Heroku users should configure Scout via environment variables instead of the yaml config file:

heroku config:set SCOUT_KEY='your_key'
heroku config:set SCOUT_NAME='My Heroku App'
heroku config:set SCOUT_MONITOR=true

If you install Scout via the Heroku Add-on, SCOUT_MONITOR and SCOUT_KEY are set automatically during provisioning.

Does Scout work with Docker?

Yes. Scout runs within Docker containers without special configuration. Use environment variables for configuration instead of the yaml config file.

How do I configure Scout on Cloud Foundry?

Scout works on Cloud Foundry. Recommended configuration:

common: &defaults
  key: YOUR_KEY
  monitor: true
  name: <%= ENV['VCAP_APPLICATION'] ? JSON.parse(ENV['VCAP_APPLICATION'])['application_name'] : "YOUR APP NAME" %>
  log_file_path: STDOUT
  hostname: <%= ENV['VCAP_APPLICATION'] ? "#{JSON.parse(ENV['VCAP_APPLICATION'])['application_name']}.#{ENV['CF_INSTANCE_INDEX']}" : Socket.gethostname %>

This sends logs to Loggregator and uses meaningful hostname identifiers.

Ready to Optimize Your App?

Join engineering teams who trust Scout Monitoring for hassle-free performance monitoring. With our 3-step setup, powerful tooling, and responsive support, you can quickly identify and fix performance issues before they impact your users.