Browse files

Check for existence of Merb and Merb::BootLoader constants

The NewRelic gem improperly assumes that because Merb is defined
it should add Merb instrumentation. This can cause an exception in
apps that are pulling in a piece of Merb, like the Merb Router.
(cherry picked from commit efa8671)

Signed-off-by: Bill Kayser <>
  • Loading branch information...
1 parent 569ccd5 commit 6996a9f708b3b7ca58bff3d7072d3b66de25118f Rob Olson + Matt Wilson committed with bkayser Jun 8, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/newrelic_rpm.rb
@@ -18,7 +18,7 @@
# directly.
require 'new_relic/control'
-if defined? Merb
+if defined?(Merb) && defined?(Merb::BootLoader)
module NewRelic
class MerbBootLoader < Merb::BootLoader
after Merb::BootLoader::ChooseAdapter

0 comments on commit 6996a9f

Please sign in to comment.