Skip to content

Instantly share code, notes, and snippets.

@kyanny
Created May 17, 2014 19:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyanny/ea06c6eb76500c3ed15a to your computer and use it in GitHub Desktop.
Save kyanny/ea06c6eb76500c3ed15a to your computer and use it in GitHub Desktop.
newrelic_rpm 3.8.1.221 and newrelic-grape crash minimum replicate code: uninitialized constant NewRelic::MetricSpec (NameError)
require 'grape'
require 'newrelic-grape'
require 'newrelic_rpm'
require 'new_relic/rack/developer_mode'
use NewRelic::Rack::DeveloperMode
NewRelic::Agent.manual_start
run ->(env) { [200, { 'Content-Type' => 'text/plain' }, ['ok']] }
source "https://rubygems.org"
gem 'grape'
gem 'newrelic_rpm', '3.8.1.221'
gem 'newrelic-grape'
@kyanny
Copy link
Author

kyanny commented May 17, 2014

$ bundle exec rackup
/Users/kyanny/.gem/ruby/2.1.2/gems/newrelic_rpm-3.8.1.221/lib/new_relic/agent/transaction.rb:481:in `<class:Transaction>': uninitialized constant NewRelic::MetricSpec (NameError)
        from /Users/kyanny/.gem/ruby/2.1.2/gems/newrelic_rpm-3.8.1.221/lib/new_relic/agent/transaction.rb:14:in `<module:Agent>'
        from /Users/kyanny/.gem/ruby/2.1.2/gems/newrelic_rpm-3.8.1.221/lib/new_relic/agent/transaction.rb:9:in `<module:NewRelic>'
        from /Users/kyanny/.gem/ruby/2.1.2/gems/newrelic_rpm-3.8.1.221/lib/new_relic/agent/transaction.rb:8:in `<top (required)>'
        from /Users/kyanny/.gem/ruby/2.1.2/gems/newrelic_rpm-3.8.1.221/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:5:in `require'
        from /Users/kyanny/.gem/ruby/2.1.2/gems/newrelic_rpm-3.8.1.221/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:5:in `<top (required)>'
        from /Users/kyanny/.gem/ruby/2.1.2/gems/newrelic-grape-1.3.1/lib/newrelic-grape/instrument.rb:1:in `require'
        from /Users/kyanny/.gem/ruby/2.1.2/gems/newrelic-grape-1.3.1/lib/newrelic-grape/instrument.rb:1:in `<top (required)>'
        from /Users/kyanny/.gem/ruby/2.1.2/gems/newrelic-grape-1.3.1/lib/newrelic-grape.rb:2:in `require'
        from /Users/kyanny/.gem/ruby/2.1.2/gems/newrelic-grape-1.3.1/lib/newrelic-grape.rb:2:in `<top (required)>'
        from /Users/kyanny/tmp/ggg/config.ru:2:in `require'
        from /Users/kyanny/tmp/ggg/config.ru:2:in `block in <main>'
        from /Users/kyanny/.gem/ruby/2.1.2/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
        from /Users/kyanny/.gem/ruby/2.1.2/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
        from /Users/kyanny/tmp/ggg/config.ru:in `new'
        from /Users/kyanny/tmp/ggg/config.ru:in `<main>'
        from /Users/kyanny/.gem/ruby/2.1.2/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
        from /Users/kyanny/.gem/ruby/2.1.2/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
        from /Users/kyanny/.gem/ruby/2.1.2/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
        from /Users/kyanny/.gem/ruby/2.1.2/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
        from /Users/kyanny/.gem/ruby/2.1.2/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
        from /Users/kyanny/.gem/ruby/2.1.2/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
        from /Users/kyanny/.gem/ruby/2.1.2/gems/rack-1.5.2/lib/rack/server.rb:250:in `start'
        from /Users/kyanny/.gem/ruby/2.1.2/gems/rack-1.5.2/lib/rack/server.rb:141:in `start'
        from /Users/kyanny/.gem/ruby/2.1.2/gems/rack-1.5.2/bin/rackup:4:in `<top (required)>'
        from /Users/kyanny/.gem/ruby/2.1.2/bin/rackup:23:in `load'
        from /Users/kyanny/.gem/ruby/2.1.2/bin/rackup:23:in `<main>'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment