A list of things to do when you hit a bug in your ruby code.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



  1. Close your blocks the minute you open them.

  2. Check the line number.

  3. Read the error the message. Like all of it. Seriously.

  4. Adding a debug before and after.

  5. Confirm all variable values.

  6. Re-read the code that generated the error.

  7. Read the entire test, description, describe, it block.

  8. Reconfirm what the purpose of the unit of code that the error is in.


  10. Confirm the type of objects.

  11. Confirm the level of nested data structures.

  12. Tell a story, out loud, about what you're trying to do.

  13. Avoid the rabbit hole, don't yak shave, remember, constantly, exactly what you're trying to do.

  14. One error at a time.

  15. Run every change you're doing.

  16. Copy the method to Pry and try to run it in isolation.

  17. Confirm your return values.

  18. Confirm the values of your arguments.

  19. Ask someone.

Creative Commons License
Ruby Debugging Checklist by Flatiron School is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.