Brian Wigginton
Brian Wigginton

Reputation: 2652

Disable New Relic from reporting when switching environments locally

We use New Relic to monitor our Rails applications. Sometimes, when we are developing locally, we need to switch to a different environment to test things. We start up our server like so

$ RAILS_ENV=production rails s

Unfortunately, now our app starts sending data to new relic as though we added another machine to our production cluster.

How can we disable the New Relic gem from sending data up to New Relic when we need to test settings locally under a different environment?

Upvotes: 7

Views: 1292

Answers (1)

Nick Messick
Nick Messick

Reputation: 3212

This should work: NEWRELIC_ENABLE=false RAILS_ENV=production rails s

Upvotes: 10

Related Questions