whois-ruby

Setting address of whois service for ruby whois gem

耗尽温柔 提交于 2019-12-24 11:05:20
问题 Using the ruby whois gem, how do I set the server address of the whois service? Setting the bind_host, I get an error. > whois_client = Whois::Client.new(bind_host: "192.0.47.59", bind_port: 43) => #<Whois::Client:0x00000008188e7e50 @timeout=10, @settings={:bind_host=>"192.0.47.59", :bind_port=>43}> > record = whois_client.lookup('wandajackson.com') Whois::ConnectionError: Errno::EADDRNOTAVAIL: Can't assign requested address - bind(2) for "192.0.47.59" port 43 from (irb):4 回答1: I'm pretty