Added Ruby Version check to catch UTF-8 error