Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Debugging Rails Itself

Debugging Rails Itself

Tracking down bugs can be hard. Tracking down bugs in a codebase touched by 5000 people is even harder. Making heads or tails of an inheritance-happy codebase like Rails can be a nightmare. How do you find where the bug in save is when save is overridden by 15 different modules?!

In this talk, we'll look at the process that goes into fixing a bug in Rails itself. You'll learn about every step from the initial report to when the fix is eventually committed. You'll learn how to navigate Rails' internals, and how to find the source of the problem -- even if you've never committed to Rails.

Sean Griffin

April 17, 2018
Tweet

More Decks by Sean Griffin

Other Decks in Programming

Transcript

  1. Who am I? • Sean Griffin • 10x Hacker Ninja

    Guru at Shopify • @sgrif on Twitter (please tweet at me during this talk) • Rails Committer • Maintainer of Active Record • Creator of Diesel • Bikeshed co-host
  2. class BugTest < Minitest::Test def test_association_stuff post = Post.create! post.comments

    << Comment.create! assert_equal 1, post.comments.count assert_equal 1, Comment.count assert_equal post.id, Comment.first.post.id end end
  3. Bisecting basics git checkout master git bisect start git bisect

    bad git checkout 4-2-stable git bisect good