3

Heroku アプリを Unicorn に移行した後、New Relic はデプロイ以外のレポートを表示しなくなりました。ここで提案されている解決策を試してみました: https://newrelic.com/docs/ruby/no-data-with-unicorn運が悪い. すべての宝石を更新しようとしましたが、エラーが発生しました:

/Users/bashar/.rvm/gems/ruby-1.9.3-preview1@global/gems/rpm_contrib-2.1.11/lib/rpm_contrib/instrumentation/mongoid.rb:13:in block (2 levels) in <top (required)>': uninitialized constant Mongoid::Collection (NameError) from /Users/bashar/.rvm/gems/ruby-1.9.3-preview1/gems/newrelic_rpm-3.6.0.83/vendor/gems/dependency_detection-0.0.1.build/lib/dependency_detection.rb:53:incall' を /Users/bashar/ から終了しています.rvm/gems/ruby-1.9.3-preview1/gems/newrelic_rpm-3.6.0.83/vendor/gems/dependency_detection-0.0.1.build/lib/dependency_detection.rb:53:in block in execute' from /Users/bashar/.rvm/gems/ruby-1.9.3-preview1/gems/newrelic_rpm-3.6.0.83/vendor/gems/dependency_detection-0.0.1.build/lib/dependency_detection.rb:52:ineach' from /Users/bashar/ .rvm/gems/ruby-1.9.3-preview1/gems/newrelic_rpm-3.6.0.83/vendor/gems/dependency_detection-0.0.1.build/lib/dependency_detection.rb:52:in execute' from /Users/bashar/.rvm/gems/ruby-1.9.3-preview1/gems/newrelic_rpm-3.6.0.83/vendor/gems/dependency_detection-0.0.1.build/lib/dependency_detection.rb:19:inblock in detect!」/Users/bashar/.rvm/gems/ruby-1.9.3-preview1/gems/newrelic_rpm-3.6.0.83/vendor/gems/dependency_detection-0.0.1.build/lib/dependency_detection.rb:17:in からeach' from /Users/bashar/.rvm/gems/ruby-1.9.3-preview1/gems/newrelic_rpm-3.6.0.83/vendor/gems/dependency_detection-0.0.1.build/lib/dependency_detection.rb:17:in探知!' /Users/bashar/.rvm/gems/ruby-1.9.3-preview1/gems/newrelic_rpm-3.6.0.83/lib/new_relic/control/instrumentation.rb:93:in _install_instrumentation' from /Users/bashar/.rvm/gems/ruby-1.9.3-preview1/gems/newrelic_rpm-3.6.0.83/lib/new_relic/control/instrumentation.rb:52:ininstall_instrumentationから/Users/bashar/.rvmから/gems/ruby-1.9.3-preview1/gems/newrelic_rpm-3.6.0.83/lib/new_relic/control/instance_methods.rb:76:in init_plugin' from /Users/bashar/.rvm/gems/ruby-1.9.3-preview1/gems/newrelic_rpm-3.6.0.83/lib/newrelic_rpm.rb:40:inblock in ' from /Users/bashar/.rvm/gems/ruby-1.9. 3-preview1/gems/railties-3.2.11/lib/rails/initializable.rb:30:in instance_exec' from /Users/bashar/.rvm/gems/ruby-1.9.3-preview1/gems/railties-3.2.11/lib/rails/initializable.rb:30:inrun' from /Users/bashar/.rvm/gems/ruby-1.9.3-preview1/gems/railties-3.2. 11/lib/rails/initializable.rb:55:in block in run_initializers' from /Users/bashar/.rvm/gems/ruby-1.9.3-preview1/gems/railties-3.2.11/lib/rails/initializable.rb:54:ineach' から /Users/bashar/.rvm/gems/ruby-1.9.3-preview1/gems/railties-3.2.11/lib/rails/initializable.rb: 54:インチrun_initializers' from /Users/bashar/.rvm/gems/ruby-1.9.3-preview1/gems/railties-3.2.11/lib/rails/application.rb:136:in初期化!from /Users/bashar/.rvm/gems/ruby-1.9.3-preview1/gems/railties-3.2.11/lib/rails/railtie/configurable.rb:30:in method_missing' from /Users/bashar/rails-projects/myapp/config/environment.rb:5:in' from /Users/bashar/rails-projects /myapp/config.ru:7:in block in <main>' from /Users/bashar/.rvm/gems/ruby-1.9.3-preview1/gems/rack-1.4.1/lib/rack/builder.rb:51:ininstance_eval ' from /Users/bashar/.rvm/gems/ruby-1.9.3-preview1/gems/rack-1.4.1/lib/rack/builder.rb:51:in initialize' from /Users/bashar/rails-projects/myapp/config.ru:1:innew' from /Users/bashar/rails-projects/myapp/config.ru:1:in <main>' from /Users/bashar/.rvm/gems/ruby-1.9.3-preview1/gems/rack-1.4.1/lib/rack/builder.rb:40:ineval' from /Users/bashar/.rvm/gems/ruby-1.9.3-preview1/gems/rack-1.4.1/ lib/rack/builder.rb:40:in parse_file' from /Users/bashar/.rvm/gems/ruby-1.9.3-preview1/gems/rack-1.4.1/lib/rack/server.rb:200:inapp' から /Users/bashar/.rvm/gems/ruby-1.9.3-preview1/gems/railties-3.2.11/lib/rails/commands/server.rb: 46: app' from /Users/bashar/.rvm/gems/ruby-1.9.3-preview1/gems/rack-1.4.1/lib/rack/server.rb:301:in/Users/bashar/.rvm/gems/ruby-1.9.3-preview1/gems/rack-1.4.1/lib/rack/server.rb:252:in の「wrapd_app」でstart' from /Users/bashar/.rvm/gems/ruby-1.9.3-preview1/gems/railties-3.2.11/lib/rails/commands/server.rb:70:instart' from /Users/bashar/.rvm/gems/ruby-1.9.3-preview1/gems/railties-3.2.11/lib/rails/commands.rb:55:in block in <top (required)>' from /Users/bashar/.rvm/gems/ruby-1.9.3-preview1/gems/railties-3.2.11/lib/rails/commands.rb:50:intap' from /Users/bashar/.rvm /gems/ruby-1.9.3-preview1/gems/railties-3.2.11/lib/rails/commands.rb:50:in <top (required)>' from script/rails:6:inrequire' from script/rails:6:in `'

私は次の宝石を順番に持っています:

gem 'rpm_contrib'
gem 'newrelic_rpm'
gem 'newrelic_moped'

過去に Mongoid 3 にアップグレードしたときに同様の問題が発生しましたが、当時の解決策は newrelic_moped でした。今回はないようです。

何か案が?

4

1 に答える 1

0

私も同じでした。以下のコードを に追加しますconfig/initializers/newrelic.rb

# Ensure the agent is started using Unicorn.
# This is needed when using Unicorn and preload_app is not set to true.
# See https://newrelic.com/docs/ruby/no-data-with-unicorn
if defined? Unicorn
  ::NewRelic::Agent.manual_start()
  ::NewRelic::Agent.after_fork(:force_reconnect => true)
end
于 2013-04-27T22:08:51.247 に答える