This may be a rails 4 thing, the line 

``` 
name += [order.customer.first_name, order.customer.last_name].join(" ") if order.customer
```

causes an exception to be thrown