when I run this code,
payload = 'username'
hmac_secret = 'my$ecretK3y'
token = JWT.encode payload, hmac_secret, 'HS256'
I get this error JSON::GeneratorError: only generation of JSON objects or arrays allowed
I am using ruby version 2.3.0 in a rails 4.2.6 project