cjheath / geoip

The Ruby gem for querying Maxmind.com's GeoIP database, which returns the geographic location of a server given its IP address

Home Page:http://geoip.rubyforge.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NoMethodError: undefined method `bytes' for "ved":String

philister opened this issue · comments

Hi,

on both win and debian systems and two GeoIP.dat's I get this error:
geo = GeoIP.new("/usr/share/GeoIP/GeoIP.dat")
NoMethodError: undefined method bytes' for "ved":String from /usr/lib/ruby/gems/1.8/gems/geoip-0.8.9/lib/geoip.rb:672:ininitialize'

Any ideas or hints?

Thanks and regards, Ph.

You need to upgrade your Ruby from 1.8.6 to at least 1.8.7, or define your own version of String#bytes (which returns an Enumerable#Enumerator).