Installs Honeybadger configured via a HONEYBADGER_API_KEY ENV variable.
Used 9 times
B
Ben Morrall
Usage
Setup a new project in Honeybadger and set the `HONEYBADGER_API_KEY` ENV Variable to the API Key (Have you tried dotenv?).
Run this command in your Rails app directory in the terminal:
rails app:template LOCATION="https://railsbytes.com/script/XvEsPe"
Template Source
Review the code before running this template on your machine.
run "spring stop"
gem "honeybadger"
in_root do
file "config/honeybadger.yml", <<~'YAML'
---
# For more options, see https://docs.honeybadger.io/lib/ruby/gem-reference/configuration
api_key: '<%= ENV.fetch("HONEYBADGER_API_KEY") %>'
# The environment your app is running in.
env: "<%= Rails.env %>"
# The absolute path to your project folder.
root: "<%= Rails.root.to_s %>"
# Honeybadger won't report errors in these environments.
development_environments:
- test
- development
- cucumber
# By default, Honeybadger won't report errors in the development_environments.
# You can override this by explicitly setting report_data to true or false.
# report_data: true
# The current Git revision of your project. Defaults to the last commit hash.
# revision: null
# Enable verbose debug logging (useful for troubleshooting).
debug: false
YAML
end
run "bundle install"