It is possible that you don't have a corresponding client for an inspection record that has a client_id. Maybe you manually deleted a client at some point? Check you data and also add checks to your code to ensure that you don't throw an error so something like this might help
<td><%= inspection.client.name unless inspection.client.blank?%></td> # returns undefined method `name'
At least that way you will be able to get a visual idea of which inspections don't have corresponding clients making it easier for you to investigate why this might be