Rails airbrake undefined方法

ani*_*ari 6 ruby-on-rails airbrake

我正在运行我的rails应用程序,它工作正常,直到昨天,但今天当我运行rails服务器它给我这个错误.虽然我的空气制动器也没有任何错误
[airbrake.rb]

Airbrake.configure do |config|
  config.api_key = APP_CONFIG.airbrake.api_key
  config.host    = APP_CONFIG.airbrake.host
  config.port    = APP_CONFIG.airbrake.port
  config.secure  = config.port == 443
end
Run Code Online (Sandbox Code Playgroud)


undefined method `api_key=' for #<Airbrake::Config:0x000000073fa1e0> (NoMethodError)
  from /home/techbirds/.rvm/gems/ruby-2.2.3/gems/airbrake-ruby-1.0.0/lib/airbrake-ruby.rb:98:in
Run Code Online (Sandbox Code Playgroud)

configure' from /home/techbirds/icare-master/config/initializers/airbrake.rb:1:in 'from /home/techbirds/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:268:in load' from /home/techbirds/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:268:inblock in load'from /home/techbirds/.rvm/宝石/红宝石2.2.3 /宝石/ activesupport-

zef*_*fer 16

看起来你无意中升级到了新的v5 Airbrake宝石.你可以:

  1. 按照迁移指南从airbrake v4迁移到v5,或
  2. 将空气制动器锁定到宝石文件中的v4,例如 gem 'airbrake', '~> 4.3.4'