NoMethodError: undefined method 'slug' for nil (NoMethodError)
- Dominant language
- Ruby
- Stars
- 548
- Forks
- 168
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 28
Description
## Error
```
undefined method 'slug' for nil (NoMethodError)
Git::Exercise.new(exercise.slug, exercise.git_type, git_sha, repo_url: exercise.track.repo_url)
^^^^^
```
## Stack trace
```
app/commands/git/generate_hash_for_important_exercise_files.rb:17 in git_exercise
app/commands/git/generate_hash_for_important_exercise_files.rb:10 in call
mandate/call_injector.rb:10 in Git::GenerateHashForImportantExerciseFiles.call
app/models/submission/test_run.rb:31 in block in
active_support/callbacks.rb:448 in instance_exec
active_support/callbacks.rb:448 in block in ActiveSupport::Callbacks::CallTemplate::InstanceExec0#make_lambda
active_support/callbacks.rb:202 in block (2 levels) in ActiveSupport::Callbacks::Filters::Before.halting
active_support/callbacks.rb:707 in block (2 levels) in ActiveSupport::Callbacks::CallbackChain#default_terminator
active_support/callbacks.rb:706 in catch
active_support/callbacks.rb:706 in block in ActiveSupport::Callbacks::CallbackChain#default_terminator
```
## Tracking Details
- **Project**: exercism-rails
- **Sentry**: [NoMethodError: undefined method 'slug' for nil (NoMethodError)](https://thalamus-ai.sentry.io/issues/145735359/)
- **Culprit**: SPI::ToolingJobsController#update
- **First seen:** Sep 8, 2026
Contributor guide
Research direction
Start with app/commands/git/generate_hash_for_important_exercise_files.rb, especially git_exercise at line 17, then trace the callback from app/models/submission/test_run.rb:31. Reproduce the TestRun path that provides a nil exercise and identify the expected handling. Done means the reported path no longer raises NoMethodError and the behavior is covered by an appropriate regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100