Use `Exception#cause` to access base exception

Using features of ruby >= 2.0 in rails 5.0