Bullet (without external services)
Kill N+1 queries and unused eager loading
Used 18 times
E
Erik Jenks
Usage
Run this command in your Rails app directory in the terminal:
rails app:template LOCATION="https://railsbytes.com/script/zyvs2W"
Template Source
Review the code before running this template on your machine.
gem_group :development do
gem 'bullet'
end
run "touch config/initializers/bullet.rb"
inject_into_file 'config/initializers/bullet.rb' do <<~EOF
if defined? Bullet
Bullet.enable = true
# Bullet.sentry = true
Bullet.alert = true
# Bullet.bullet_logger = true
Bullet.console = true
# Bullet.growl = true
Bullet.rails_logger = true
# Bullet.honeybadger = true
# Bullet.bugsnag = true
# Bullet.airbrake = true
# Bullet.rollbar = true
Bullet.add_footer = true
# Bullet.skip_html_injection = false
# Bullet.stacktrace_includes = [ 'your_gem', 'your_middleware' ]
# Bullet.stacktrace_excludes = [ 'their_gem', 'their_middleware', ['my_file.rb', 'my_method'], ['my_file.rb', 16..20] ]
# Bullet.slack = { webhook_url: 'http://some.slack.url', channel: '#default', username: 'notifier' }
end
EOF
end