I wonder if a less version-specific fix might apply here; something like:

    require 'jcode' unless ''.respond_to?(:each_char)