Whose Error Is It?
Ruby printed this
ActiveRecord::RecordNotFound: Couldn't find User with 'id'=42
What it meansA find call for a User with id 42 returned no row, and find raises an exception instead of returning nil when the record does not exist.
The first thing to checkConfirm the id exists in the database you are connected to; use find_by(id:) when missing records are expected, or rescue it and return a 404.