title | type | tags | metaDescription | redirects | freshnessValidatedDate | |||||
---|---|---|---|---|---|---|---|---|---|---|
Incompatible gems |
troubleshooting |
|
A few incompatible gems and their workarounds with the New Relic Ruby agent. |
|
never |
You are using a Ruby gem that is incompatible with the New Relic Ruby agent.
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.
**Problem**: The [db-charmer](http://rubygems.org/gems/db-charmer) gem has incompatibilities of how it patches Rails controllers.<DNT>**Solution**</DNT>: Force New Relic to load and start before `DbCharmer.enable_controller_magic!` is called. For example, add the following to your <DNT>**config/application.rb**</DNT>:
```
require 'newrelic_rpm'
NewRelic::Agent.manual_start
DbCharmer.enable_controller_magic!
```
<Collapser id="escape_utils" title="escape_utils"
<DNT>**Problem:**</DNT> The [escape_utils](https://github.com/brianmario/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.
<DNT>**Solution:**</DNT> If you see HTML source instead of the rendered page, use either of these options:
* Remove the `escape_utils` gem.
* Use [manual instrumentation](/docs/agents/ruby-agent/features/page-load-timing-ruby#manual_instrumentation) for page load timing.
<Collapser id="right_http_connection" title="right_http_connection"
<DNT>**Problem:**</DNT> If the [right_http_connection](http://rubygems.org/gems/right_http_connection) gem is loaded after `newrelic_rpm`, it patches the `Net::HTTP` class in a way that causes New Relic's Externals instrumentation to be missed.
<DNT>**Solution:**</DNT> Ensure that `right_http_connection` is required before `newrelic_rpm`.
<Collapser id="ar-octopus" title="ar-octopus"
<DNT>**Problem:**</DNT> The [ar-octopus](https://github.com/tchandy/octopus) gem changes the way ActiveRecord's connection management works, breaking the Ruby agent's ability to gather instance information, apply vendor-specific obfuscation to queries, and capture explain plans for long-running database queries.
<DNT>**Solution:**</DNT> No known workaround. Either remove the `ar-octopus` gem, or continue to use it, in which case no explain plans will be captured.