In this chapter we're going to cover the basics of installing the honeybadger gem and how configuration works. For full instructions and best practices for your framework or platform, see the Integration guides.
The first step is to add the honeybadger gem to your Gemfile:
Tell bundler to install:
Next, you'll set the API key for this project.
bundle exec honeybadger install [Your project API key]
This will do three things:
- Generate a
honeybadger.ymlfile. If you don't like config files, you can place your API key in the
- If Capistrano is installed, we'll add a require statement to Capfile.
- Send a test exception to your Honeybadger project.
Honeybadger's configuration consists of named options. Some are top level
options such as
api_key, while others have nested namespaces (separated with a
dot) such as
exceptions.ignore. The only required option is
There are three ways to configure options for the Honeybadger gem:
- honeybadger.yml configuration file
- Environment variables
- Programmatically using
By default we use the honeybadger.yml file, so that's what most of the examples will use in this guide, but the method you use is a matter of preference. Here's an example honeybadger.yml file:
--- api_key: "Your project API key"
See the Configuration reference for additional info.