Incompatible gems

Problem

You are using a Ruby gem that is incompatible with the New Relic Ruby agent.

Solution

While New Relic strives to be compatible with all gems, there are some that will not work properly with the Ruby agent. This details incompatible gems and known workarounds.

db-charmer

Problem: The db-charmer gem has incompatibilities in how it patches Rails controllers.

Solution: Force New Relic to load and start before DbCharmer.enable_controller_magic! is called. For example, add the following to your config/application.rb:

require 'newrelic_rpm' 
NewRelic::Agent.manual_start 
DbCharmer.enable_controller_magic!

 

escape_utils

Problem: Use The escape_utils gem is incompatible with automatic instrumentation for New Relic's page load timing feature (sometimes referred to as real user monitoring or RUM). Due to the way escape_utils monkey-patches Rack, your whole HTML response may be escaped.

Solution: If you see HTML source instead of the rendered page, use either of these options:

right_http_connection

Problem: If the right_http_connection gem is loaded after newrelic_rpm, it patches Net::HTTP class in a way that causes New Relic's Externals instrumentation to be missed.

Solution: Ensure that right_http_connection is required before newrelic_rpm.

ar-octopus

Problem: The ar-octopus gem changes the way that ActiveRecord's connection management works, breaking the Ruby agent's ability to capture explain plans for long-running database queries.

Solution: No known workaround - either remove the ar-octopus gem, or continue to use it, in which case no explain plans will be captured.

For more help

Additional documentation resources include:

Join the discussion about Ruby in the New Relic Online Technical Community! The Technical Community is a public platform to discuss and troubleshoot your New Relic toolset.

If you need additional help, get support at support.newrelic.com.