Ваша кодировка неверна.Я изменил твой код.Пожалуйста, запустите это.Я надеюсь, что это должно работать.
# You have to install bellow gems to your local machine
# gem install rest-client
# gem install json
require 'rest-client'
require 'json'
class Cmc
def self.listings
url = 'https://api.coinmarketcap.com/v2/listings/'
response = RestClient.get(url)
JSON.parse(response)
end
end
coins = Cmc.listings
coins["data"].each do |data|
puts "nrcoin: #{data['id']} |
namecoin: #{data['name']} |
symbolcoin: #{data['symbol']} |
slugcoin: #{data['website_slug']}"
end