---
title: Ruby agent installation: Rails plugin
source: https://docs.newrelic.com/docs/apm/agents/ruby-agent/installation/ruby-agent-installation-rails-plugin
---

This method is for installing the Ruby agent as a Rails plugin for **Rails 2 or higher**.

> #### ⚠️ IMPORTANT
>
> For most use cases, [install the Ruby agent as a gem](https://docs.newrelic.com/docs/apm/agents/ruby-agent/installation/install-new-relic-ruby-agent) instead. The gem method provides better control over versions and dependencies.

## Prerequisites [#prerequisites]

| Requirement                | Details                                                                                                                                                                                           |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **New Relic account**      | You need a [New Relic account](https://newrelic.com/signup) and your license key.                                                                                                                 |
| **Ruby and Rails version** | See [Ruby agent requirements and supported frameworks](https://docs.newrelic.com/docs/apm/agents/ruby-agent/getting-started/ruby-agent-requirements-supported-frameworks) for supported versions. |
| **Git**                    | Git must be accessible from the command line to install from GitHub.                                                                                                                              |

## Install the Rails plugin [#install]

Install the plugin from GitHub into your application's `vendor/plugins` directory:

````sh
script/plugin install git://github.com/newrelic/newrelic-ruby-agent.git
mv vendor/plugins/rpm vendor/plugins/newrelic-ruby-agent
```

If you cannot install directly from the git URL, clone the repository into the `vendor/plugins` directory manually.

````

## Configure the agent [#configure]

Copy the `newrelic.yml` file from the plugin directory into your application's `config` subdirectory:

````sh
cp vendor/plugins/newrelic-ruby-agent/newrelic.yml config/newrelic.yml
```

Edit `config/newrelic.yml` and set the two required values:

1. Set `license_key` to your <InlinePopover type="licenseKey"/>.
2. Set `app_name` to a meaningful name for your application.

For all other configuration options, see [Ruby agent configuration](/docs/apm/agents/ruby-agent/configuration/ruby-agent-configuration).

````

## Verify data is flowing [#verify]

Restart your web server, then send at least two requests to your application. Wait 2–3 minutes and open [one.newrelic.com > APM](https://one.newrelic.com/apm) to look for your app by name.

> #### 💡 TIP
>
> App not appearing? See [No data appears (Ruby)](https://docs.newrelic.com/docs/apm/agents/ruby-agent/troubleshooting/no-data-appears-ruby).

## Related articles [#related-docs]

-   [Install the Ruby agent as a gem](https://docs.newrelic.com/docs/apm/agents/ruby-agent/installation/install-new-relic-ruby-agent) — Recommended method for most use cases.
-   [Ruby agent requirements and supported frameworks](https://docs.newrelic.com/docs/apm/agents/ruby-agent/getting-started/ruby-agent-requirements-supported-frameworks) — Supported Ruby and Rails versions.
-   [Ruby agent configuration](https://docs.newrelic.com/docs/apm/agents/ruby-agent/configuration/ruby-agent-configuration) — All available configuration settings.
