• /
  • EnglishEspañolFrançais日本語한국어Português
  • Log inStart now

Ruby agent installation: Rails plugin

|View as Markdown

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 instead. The gem method provides better control over versions and dependencies.

Prerequisites

Requirement

Details

New Relic account

You need a New Relic account and your .

Ruby and Rails version

See Ruby agent requirements and supported frameworks for supported versions.

Git

Git must be accessible from the command line to install from GitHub.

Install the Rails plugin

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

bash
$
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

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

bash
$
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 .
  2. Set app_name to a meaningful name for your application.

For all other configuration options, see Ruby agent configuration.

Verify data is flowing

Restart your web server, then send at least two requests to your application. Wait 2–3 minutes and open one.newrelic.com > APM to look for your app by name.

Tip

App not appearing? See No data appears (Ruby).

Copyright © 2026 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.