Giving AI the full stack trace

Free preview 2 min to read

Two students, one error, two answers

A student hits this in the terminal:

ActiveRecord::RecordNotFound (Couldn't find ScratchArticle with 'id'=999999)

Student A asks an AI assistant: "I'm getting an error that it can't find a record, what's wrong?" Student B pastes the exact line above, plus the one line of code that raised it. Student A gets a generic answer about checking whether the record exists. Student B gets an answer that names the line, the id and a specific fix. Same error, same AI, two different outcomes, because of what each student handed over.

What the last six courses built

The six AI courses before this one, from AI tools: introduction (Cursor & Antigravity) to AI prompting: zero-shot Ruby, covered a lot. You saw what an AI coding assistant is, why a person stays responsible for what it produces, and how to ask for a useful first answer. This course narrows all of that to one everyday moment: an error just happened, and you want a diagnosis worth trusting.

A diagnosis is only as good as its input

An AI assistant reading an error can't see your terminal, your browser tab or the three attempts you've already tried. It only has the text you send. When a diagnosis names the wrong cause, the AI has usually reasoned correctly from incomplete or reworded evidence. A trustworthy diagnosis starts before the AI answers, with what you paste in.

What this course covers

  1. Pasting the exact error text, not a paraphrase.
  2. Showing the code that raised it, along with the error's name.
  3. Saying what you've already tried, so the AI doesn't retrace it.
  4. Reading a diagnosis critically instead of accepting it at face value.
  5. The risk of applying a fix you don't understand.
  6. Putting every piece together on one error, start to finish.

By the end, you'll hand an error message to an AI as it appeared, instead of describing it.

Lesson 1 of 7 · free

Keep going with lesson 2

Paste, don't paraphrase

Paraphrasing an error drops the class, key and value, so paste the exact text in its order.

A free account also gives you the quizzes, your progress and notes, and the discussion.

Type to start searching...