rework ruby code so it uses rubygem-ffi instead of rubygem-gmp