---
title: No data with Unicorn
source: https://docs.newrelic.com/docs/apm/agents/ruby-agent/troubleshooting/no-data-unicorn
---

## Problem

If you do not see data with Unicorn, follow these procedures based on your New Relic Ruby agent version.

## Solution

If you are using Ruby agent version 3.8.0 or higher, you should not need to do any additional configuration. If you're using a [supported web framework](https://docs.newrelic.com/docs/ruby/supported-frameworks), the agent should work out of the box regardless of your Unicorn configuration.

If you are using a Ruby agent version **prior to 3.8.0** with Unicorn, you will need to do one of the following in order to get data reporting:

**Upgrade to newrelic_rpm 3.8.0 or higher**

As noted above, versions 3.8.0 or higher of the newrelic_rpm gem should automatically work correctly regardless of your unicorn configuration.

**Upload `preload_app true`**

Use the `preload_app true` directive in your Unicorn configuration file. For more information, refer to the Unicorn [documentation for this configuration setting](http://unicorn.bogomips.org/Unicorn/Configurator.html#method-i-preload_app). You must ensure that Unicorn sees your configuration file by specifying the `-c <path>` option to your `unicorn` invocation (Heroku users: This will be in your `Procfile`).

> #### 💡 TIP
>
> The directive is `preload_app true`, not `preload_app = true`. The form with the equals sign will fail silently.

**Manually start the agent**

If you do not want to use `preload_app true`, you can manually call the New Relic Ruby agent's handler for forking web servers from an initializer file in `config/initializers`:

````ruby
# Ensure the agent is started using Unicorn.
# This is needed when using Unicorn and preload_app is not set to true.
# See https://docs.newrelic.com/docs/ruby/no-data-with-unicorn 
if defined?(Unicorn) && File.basename($0).start_with?('unicorn') 
   ::NewRelic::Agent.manual_start() 
   ::NewRelic::Agent.after_fork(:force_reconnect => true) 
end
```

In order for your changes to take effect, do a "clean" restart (full stop and start). Doing a normal Unicorn restart with `SIGUSR2` may not properly initialize the gem.

````
