私はここで完全に失われています。私はhttps://whoisrb.org/のドキュメントに従ってwhois宝石を設定しようとしていました。残念ながら私のマシン上でローカルにwhoisを実行しようとするとエラーが発生します。whois-rb gemがエラーを生成する: "Whois :: ServerNotFound"
エラーメッセージ:
Unable to find a WHOIS server for `;; answer received from 192.168.178.1 (75 bytes) ;; ;; security level : unchecked ;; ->>header<<- opcode: query, status: noerror, id: 51102 ;; flags: qr rd ra cd; query: 1, answer: 1, authority: 0, additional: 1 opt pseudo-record : payloadsize 512, xrcode 0, version 0, flags 32768 ;; question section (1 record) ;; google-public-dns-b.google.com. in a ;; answer section (1 record) google-public-dns-b.google.com. 84453 in a 8.8.4.4 '
が混乱しないでください、私は..だけでなく、私のモデルで対応するコードをdnsruby宝石を使用しています:
def set_isp res = Resolver.new a_record = res.query(self.domain_name) whois = Whois::Client.new rec = whois.lookup(a_record) self.isp = rec.name end
おかげで多くのことをあらかじめ!