Catch the IO error for JRuby platform
Fix build on Travis for Rubinius