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

Install the Ruby agent in GAE flexible environment

|View as Markdown

Install the New Relic Ruby agent in a Google App Engine (GAE) flexible environment using either GAE's native mode or a custom Docker runtime.

Prerequisites

Requirement

Details

New Relic account

You need a New Relic account and your .

Google Cloud project

A Google Cloud Platform project with an App Engine application created. See Google App Engine procedures for Ruby.

Google Cloud SDK

The gcloud CLI installed and initialized. See Google Cloud SDK docs.

Ruby version

See Ruby agent requirements and supported frameworks for supported versions.

Install the gem and configure your app

Add the newrelic_rpm gem to your Gemfile:

gem 'newrelic_rpm'

Then run:

bash
$
bundle install

When using GAE native mode, you provide your app code and an app.yaml. GAE deploys to a standard prebuilt Docker image automatically. No additional Dockerfile is needed.

If your app needs specific libraries or headers, use a custom runtime. Create a Dockerfile and set app.yaml to:

runtime: custom
env: flex

New Relic recommends the custom runtime method. It also recommends that you allow Google App Engine to handle health checks.

Configure the agent

Download newrelic.yml from the New Relic GitHub repository and copy it into the config directory of your application.

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.

Deploy and verify

Deploy your app using the gcloud CLI:

bash
$
gcloud app deploy

Wait until the deployment completes. Send at least two requests, then 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.