Refactor JRuby fix with more useful message