Rails3 new_relic 阻止生产控制台使用未定义的方法“episodes_enabled?”加载

发布于 2024-11-08 20:05:30 字数 1772 浏览 0 评论 0原文

在 Gemfile 中: 组(:生产)做 gem '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

in Gemfile:
group(:production) do
gem 'newrelic_rpm', '~> 3.0.0'
end

Irritatingly tries and fails to load in console. Any tips?

  # 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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

江湖彼岸 2024-11-15 20:05:30

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

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

K

It appears you have both new_relic gem and new_relic plugin installed in vendor/plugins.

We use new_relic, but only the gem (not the plugin). I would check why you have both plugin and the gem installed. It's possible plugin is old.

K

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文