---
title: "Advanced Ruby Configuration"
slug: "ruby-advanced-configuration"
description: "Track Ruby CLI apps with Stackify Ruby Profiler. Configure with specific methods, use Rails or non-Rails setup. Monitor at Monitoring > Other Apps."
updated: 2019-08-29T15:46:56Z
published: 2019-08-29T15:46:57Z
---

> ## 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.

# Advanced Configuration

## Ruby CLI Support

The Stackify Ruby Profiler can be used to track Ruby CLI applications.

### General Configuration

Configuration is required to itemize which methods mark the start of a transaction. Include a `config/stackify.json` file in your application:

```
{
    "instrumentation": [{
        "class": "SampleClass1",
        "method": "execute",
        "transaction": true
    }]
}
```

### Rails Configuration

In the `config/initializer` folder of your Rails app create `config/initializer/stackify.rb` and then add this configuration:

```
Rails.configuration.to_prepare do
  StackifyRubyAPM.run_custom_instrument
end
```

### Non-Rails Configuration

Add `StackifyRubyAPM.run_custom_instrument` to `config.ru`

Example:

```
use StackifyRubyAPM::Middleware
StackifyRubyAPM.start
StackifyRubyAPM.run_custom_instrument
at_exit { StackifyRubyAPM.stop }
```

 **Ruby CLI** applications are tracked in Retrace at **Monitoring > Other Apps**.  You must use the **Add App** button to add your application.
