我正在使用 whois gem,我在开发中工作得很好。当我在生产中上传它时,我有这样的错误:
Completed 500 Internal Server Error in 4ms
NameError (uninitialized constant Site::Whois):
app/models/site.rb:11:in `get_whois'
app/controllers/whois_controller.rb:11:in `show'
我的 get_whois 方法是
def get_whois
c = Whois::Client.new
@array = c.query(@site_domain)
end
错误是 Whois::Client.new