Product How it works Features Security What is bugstack? SDKs JavaScript SDK Python SDK Go SDK Ruby SDK Docs Pricing Blog Book a Demo
Log In Get started
Ruby · Rails

bugstack for Ruby & Rails

The bugstack SDK captures uncaught server errors in Rails and starts a fix: NoMethodError nil:NilClass, ActiveRecord::RecordNotFound, and nil-related errors. It is the crash-capture part of a product that maintains your whole repository.

What Ruby Errors bugstack Fixes

Install the SDK

Add bugstack to your Gemfile:

gem install bugstack

Or add it to your Gemfile and bundle:

# Gemfile
gem 'bugstack'
bundle install

Then initialize it in an initializer:

# config/initializers/bugstack.rb
Bugstack.configure do |config|
  config.api_key = ENV["BUGSTACK_API_KEY"]
end

Example Fix

bugstack detects a NoMethodError caused by calling a method on nil and writes a small fix:

Before (broken)
def show
  @user = User.find_by(id: params[:id])
  @email = @user.email
end

# Runtime error when user is nil:
# NoMethodError: undefined method
#   'email' for nil:NilClass
After (fixed by bugstack)
def show
  @user = User.find_by(id: params[:id])
  if @user.nil?
    head :not_found
    return
  end
  @email = @user.email
end

What else bugstack does for this repository

The SDK is one part. Once your repository is connected, bugstack also scans your Ruby gems for known vulnerabilities and outdated versions, scans for secrets, and acts on failed deploys if you host on Render. It scans and reports, and it can open pull requests for what it finds. Those pull requests are switched on per account. Every change arrives as a pull request, and you set how much happens without you.

Related Error Guides

Full installation guide with config reference →

Hand off the upkeep of your Ruby app

bugstack captures uncaught server errors in production, finds the cause, writes the fix, and opens a pull request in minutes. Your CI runs on every change, and you decide how much happens without you.

Get started with your Ruby app

Connect GitHub. Add the SDK. That's the setup.