Rails3 new_relic 阻止生产控制台使用未定义的方法“episodes_enabled?”加载
在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来您在供应商/插件中安装了 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