weppos / whois

An intelligent — pure Ruby — WHOIS client and parser.
https://whoisrb.org
MIT License
1.13k stars 283 forks source link

What to do when hitting this error: "Unable to find a WHOIS server for `google.com' (Whois::ServerNotFound)" #643

Closed rubyFeedback closed 2 years ago

rubyFeedback commented 2 years ago

Hi,

I just installed the latest whois gem.

I can require it:

require 'whois' # => true

However had copy/pasting the example on the README does not work - see below:

whois = Whois::Client.new
whois.lookup("google.com")
/home/Programs/Ruby/3.1.0/lib/ruby/site_ruby/3.1.0/whois/server.rb:264:in `guess': Unable to find a
WHOIS server for `google.com' (Whois::ServerNotFound)

I'd love to integrate whois into a ruby-gtk3 "pinger" utility, to show additional information in the GUI, aside from a simple "ping", but I can not get whois to work right now. Thus, it would be nice to have hints given in a FAQ or the documentation about this problem.

weppos commented 2 years ago

Are you sure you don't have something that conflicts with the library? I cannot reproduce your issue:

➜  whois-ruby git:(main) bin/console
irb(main):001:0> whois = Whois::Client.new
irb(main):002:0> whois.lookup("google.com")
=> "   Domain Name: GOOGLE.COM\r\n   Registry Domain ID: 2138514_DOMAIN_COM-VRSN ..."