ruby-on-railsrubyairbrake

How can I get airbrake out of my development and test environment?


I've been having major problems with the airbrake gem that is seriously impeding my work flow lately. As an example, I am working on some front end stuff with coffeescript. When I make an error like a typo or anything, I get this error message:enter image description here

As you can see from the image, this does not help me at all whatsoever and it takes me absolutely forever to figure out what's wrong. A second example is running a rake test.

When I have airbrake and run rake test, if I were to say have something wrong with mhy configuration, I get this horrible long string of text that looks like this:

enter image description here

Basically what the picture is saying is that I didn't specify the name of my localhost test database but you wouldn't necessarily know that based on the errors that airbrake yields.

In my airbrake.rbg I have the following configuration settings:

Airbrake.configure do |config|
  config.project_key = ENV['AIRBRAKE_API_KEY']
  config.host = "#{ENV['AIRBRAKE_HOST']}:#{ENV['AIRBRAKE_PORT'].to_i}"
  config.project_id = ENV['AIRBRAKE_PROJECT_ID']
  config.ignore_environments = %w(development test)
end

class Airbrake::Sender
  def json_api_enabled?
    true
  end
end

As you can see, I should have airbrake configured correctly to ignore both my test and development database but this is not working. Has anyone had this problem before. I would really love to fix this once and for all so its not a huge problem anymore. Any help would be appreciated, thanks.


Solution

  • This looks like it is a bug in an older version of Airbrake that has been resolved in newer versions.

    Try updating Airbrake in your Gemfile to the latest version.

    gem 'airbrake', '~> 5.5'