Raise a more useful exception on Rails4/JRuby