Reference exception in rack.errors