Ruby on Rails - Rails3 new_relic 阻止生产控制台使用未定义的方法"episodes_enabled?



in Gemfile:组(:p生产) 做 宝石 'newrelic_rpm', '~> 3.0.0'结束

令人恼火的是尝试在控制台中加载失败。 有什么提示吗?

  # RAILS_ENV=production rails c
/u/apps/new/releases/2011/vendor/plugins/rpm/lib/new_relic/control/frameworks/rails.rb:33:in `install_episodes': undefined method `episodes_enabled?' for #<NewRelic::Control::Frameworks::Rails3:0xa16d3e8> (NoMethodError)
  from /u/apps/new/releases/2011/vendor/plugins/rpm/lib/new_relic/control/frameworks/rails.rb:28:in `init_config'
  from /u/apps/new/releases/2011/vendor/bundle/ruby/1.8/gems/newrelic_rpm-3.0.0/lib/new_relic/control/instance_methods.rb:60:in `init_plugin'
  from /u/apps/new/releases/2011/vendor/bundle/ruby/1.8/gems/newrelic_rpm-3.0.0/lib/newrelic_rpm.rb:36
  from /u/apps/new/releases/2011/vendor/bundle/ruby/1.8/gems/railties-3.0.5/lib/rails/initializable.rb:25:in `instance_exec'
  from /u/apps/new/releases/2011/vendor/bundle/ruby/1.8/gems/railties-3.0.5/lib/rails/initializable.rb:25:in `run'
  from /u/apps/new/releases/2011/vendor/bundle/ruby/1.8/gems/railties-3.0.5/lib/rails/initializable.rb:50:in `run_initializers'
  from /u/apps/new/releases/2011/vendor/bundle/ruby/1.8/gems/railties-3.0.5/lib/rails/initializable.rb:49:in `each'
  from /u/apps/new/releases/2011/vendor/bundle/ruby/1.8/gems/railties-3.0.5/lib/rails/initializable.rb:49:in `run_initializers'
  from /u/apps/new/releases/2011/vendor/bundle/ruby/1.8/gems/railties-3.0.5/lib/rails/application.rb:134:in `initialize!'
  from /u/apps/new/releases/2011/vendor/bundle/ruby/1.8/gems/railties-3.0.5/lib/rails/application.rb:77:in `send'
  from /u/apps/new/releases/2011/vendor/bundle/ruby/1.8/gems/railties-3.0.5/lib/rails/application.rb:77:in `method_missing'
  from /u/apps/new/releases/2011/config/environment.rb:5

看来您在供应商/插件中安装了new_relic gem 和new_relic插件。

我们使用new_relic,但只使用 gem(而不是插件)。 我会检查为什么你同时安装了插件和 gem。 插件可能很旧。

K

相关内容

  • 没有找到相关文章