Installation
Install ActiveRabbit using RubyGems or from source.
RubyGems (Recommended)
The simplest way to install ActiveRabbit is via RubyGems:
# Add to your Gemfile
gem 'activerabbit-ai'
# Then run
bundle installOr install it directly:
gem install activerabbit-aiFrom Source
To install from the latest source code:
git clone https://github.com/activerabbit-ai/activerabbit.git
cd activerabbit
bundle install
rake installVersion Requirements
| Dependency | Minimum Version | Recommended |
|---|---|---|
| Ruby | 2.7 | 3.2+ |
| Rails | 6.0 | 7.0+ |
| Bundler | 2.0 | 2.4+ |
Framework Integration
Ruby on Rails
ActiveRabbit automatically integrates with Rails when the gem is loaded. No additional configuration is required for basic error tracking.
The gem automatically:
- Installs exception handling middleware
- Captures unhandled exceptions
- Adds request context (URL, params, headers)
- Integrates with Active Record for query tracking
Sinatra
For Sinatra applications, add the middleware manually:
require 'activerabbit'
require 'sinatra'
ActiveRabbit.configure do |config|
config.api_key = ENV['ACTIVERABBIT_API_KEY']
end
use ActiveRabbit::Rack::Middleware
get '/' do
'Hello World!'
endPlain Ruby
For plain Ruby applications:
require 'activerabbit'
ActiveRabbit.configure do |config|
config.api_key = ENV['ACTIVERABBIT_API_KEY']
end
begin
# Your code here
do_something_risky
rescue => e
ActiveRabbit.capture_exception(e)
raise
endVerifying Installation
After installation, verify everything is working:
# Start Rails console
rails console
# Check if ActiveRabbit is loaded
ActiveRabbit.configured?
# => true
# Send a test message
ActiveRabbit.capture_message("Installation test!")
# => #<ActiveRabbit::Event:0x...>Visit your ActiveRabbit dashboard to confirm the test message was received.
Troubleshooting
Gem not found
If you get a "could not find gem" error:
# Clear bundler cache
bundle clean --force
bundle installAPI key not configured
If you see "API key not configured" errors:
# Verify your environment variable
puts ENV['ACTIVERABBIT_API_KEY']
# Should output your API key
# Or set it directly in the initializer (not recommended for production)
ActiveRabbit.configure do |config|
config.api_key = 'your_api_key_here'
endSSL Certificate Errors
If you encounter SSL errors, ensure your system certificates are up to date:
# macOS
brew install openssl
brew install ca-certificates
# Ubuntu/Debian
sudo apt-get update
sudo apt-get install ca-certificatesNeed Help?
If you're still having issues, check our GitHub Issues or reach out to support at [email protected]