--- title: "Ruby APM with Scalingo" slug: "ruby-apm-with-scalingo" description: "Learn how to install the Ruby APM Profiler in your Scalingo-based Ruby app. Follow easy steps for setup, configuration, and verification in Retrace dashboard." updated: 2020-06-18T20:39:11Z published: 2020-06-18T20:39:11Z canonical: "docs.stackify.com/ruby-apm-with-scalingo" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.stackify.com/llms.txt > Use this file to discover all available pages before exploring further. # Ruby APM with Scalingo This document details how to install the **Ruby APM Profiler** in your **Ruby** application running on **Scalingo**. ## Ruby Application Setup ### Add Stackify APM Module Modify application `Gemfile`: ``` gem 'stackify-ruby-apm' ``` ### Configure Application Add `config/stackify_apm.yml` to your application, modify **application_name** and **environment_name**. ``` application_name: 'Ruby Application' environment_name: 'Production' ``` #### Rails Profiler will startup automatically, no additional configuration. #### Non-Rails Include **StackifyRubyAPM::Middleware** when starting your application: ``` # config.ru require 'stackify-ruby-apm' use StackifyRubyAPM::Middleware StackifyRubyAPM.start # application startup at_exit { StackifyRubyAPM.stop } ``` ### Add Buildpack Add/Create `.buildpacks` file with following line at the top: ``` https://github.com/stackify/heroku-buildpack-stackify.git ``` ### Configure Buildpack In the Scalingo UI add the following Environment variables: ``` STACKIFY_KEY=XXXXXXXXXX STACKIFY_APPLICATION_NAME=Ruby Application STACKIFY_ENVIRONMENT_NAME=Production ``` Set `STACKIFY_KEY` to your **Stackify Activation Key**. ## Verify Deploy changes to Scalingo and make requests. You can then verify results in the Retrace dashboard.