Problem with run example code

I try to configure jwt token. But when I run code from the example I’m getting the error

Traceback (most recent call last):
3: from ruby.ry:21:in <main>' 2: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jwt-multisig-1.0.0/lib/jwt-multisig.rb:42:ingenerate_jwt’
1: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jwt-multisig-1.0.0/lib/jwt-multisig.rb:215:in proxy_exception' C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jwt-multisig-1.0.0/lib/jwt-multisig.rb:218:inrescue in proxy_exception’: #<NoMethodError: undefined method `base64url_encode’ for JWT::Encode:Class> (JWT::EncodeError)

require 'openssl'
require 'jwt-multisig'
require 'base64'
require 'json'

payload = {
verify_jti: true,
verify_aud: true,
exp_leeway: 180
}

# You can choose what signatures the JWT should include.

private_keychain = {

:'backend-1.mycompany.example' => OpenSSL::PKey.read(Base64.urlsafe_decode64('LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUF5UzFiVS9GeHNyLzErZkNCNEg2QwpOT1Eyc0trdmU5Z01EaDBxQ1p4a2hpRkx0cUdMU1JsMFEvbDhxYVdwQzUwaGU0Y1VUUkxqQnFrQmhLTldqVk8zClFUWno0d0wrVTNkeTUxd1BRK0pSZnUrMGVBZFhBN2hodzRBcTJRWDlsRmxnTHZoOWg1V2Jicys5OWxpZXNodVkKUTFyeDRHQ29DRm9POUdsR3lMWE8weG5qNDBIMStqUEVOWmJDTk10Uys2SitBYnpvcGQ4bmFuOGpwRkVXQTh1bQpFWmZjN2doZUM3Ynl2bG5SUDFMRVlHcEkrNS9KNEZiRXJybjNDeVJpTEtVNDEwYUIxcFliSWQxWHFqMFUvY0t1CnduSWdrblRPMFhmdGNyNHV6c05scms0NHNRemZPa0hjZ0JNOXhJd2llM0NYVnBCSkhacUhyOGg5TmNhL0lWL1UKTHdJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg==')),
}

algorithms = {
:'backend-1.mycompany.example' => 'RS256'
}

jwt = JWT::Multisig.generate_jwt(payload, private_keychain, algorithms)
Kernel.puts JSON.dump(jwt) # The output will include serialized JWT.
# Save your JWT in data.json
File.open('./data.json','w') do |f|
f.write(jwt.to_json)
end

PS. I’m not familiar with ruby