Comments (5)
On 08/06/2011, at 10:04 PM, vitobotta wrote:
Hi, I am trying to use this gem in an app, but for some reason the
GeoIP class cannot be found:
ree-1.8.7-2011.03 :001 > require 'geoip'
=> true
ree-1.8.7-2011.03 :002 > GeoIP
NameError: uninitialized constant GeoIP
from (irb):2Am I missing something?
That's very strange; something must be wrong with your gem
configuration.
Try this:
before = Object.constants
require 'geoip'
p Object.constants-before
That will tell you what global constants (if any) were added by
requiring geoip.
Also, where does "gem show geoip" open up?
Clifford Heath.
from geoip.
Thanks a lot for the quick reply :)
Earlier I was trying the gem with the IRB console, when I got the error. But now I am using it with the Rails console -after adding the gem to the Gemfile as usual- and it works.
I need it with a Rails app now so it's OK :)
Anyway
1)
ree-1.8.7-2011.03 :004 > p Object.constants-before
["Autometal", "FileUtils"]
501 [ ~ ] $ gem show geoip
ERROR: While executing gem ... (RuntimeError)
Unknown command show
but..
502 [ ~ ] $ gem list geoip
*** LOCAL GEMS ***
geoip (1.1.1)
Everything looks otherwise fine on my system and I don't have any other problem apart this (I am using RVM and have also tried to downgrade RubyGems just in case), so I wouldn't know why this is happening.
But anyway with Rails it's working correctly.
Thanks!
Vito
On 8 Jun 2011, at 14:34, cjheath wrote:
On 08/06/2011, at 10:04 PM, vitobotta wrote:
Hi, I am trying to use this gem in an app, but for some reason the
GeoIP class cannot be found:
ree-1.8.7-2011.03 :001 > require 'geoip'
=> true
ree-1.8.7-2011.03 :002 > GeoIP
NameError: uninitialized constant GeoIP
from (irb):2Am I missing something?
That's very strange; something must be wrong with your gem
configuration.
Try this:before = Object.constants
require 'geoip'
p Object.constants-beforeThat will tell you what global constants (if any) were added by
requiring geoip.Also, where does "gem show geoip" open up?
Clifford Heath.
Reply to this email directly or view it on GitHub:
#13 (comment)
from geoip.
On 08/06/2011, at 11:41 PM, vitobotta wrote:
ree-1.8.7-2011.03 :004 > p Object.constants-before
["Autometal", "FileUtils"]
.... but no Geoip. Weird. I wonder what Autometal is, it sounds
like a loader type thing that might have interfered with the
require process.
501 [ ~ ] $ gem show geoip
ERROR: While executing gem ... (RuntimeError)
Oh sorry, I meant "gem open", but "gem list" is also good.
502 [ ~ ] $ gem list geoip
*** LOCAL GEMS ***
geoip (1.1.1)
And you're using bundler too? Is the bundle up to date?
Clifford Heath.
from geoip.
Hi Clifford,
thanks - yes I do use bundler and it's up to date. I think I found what the problem was: I had tried another gem (I think autometal-geoip) before finding yours, and it seems like it hadn't beed uninstalled cleanly.
So I don't think it's a problem with your gem :)
On a side note, after playing with the gem and seeing some results, I noticed that the GeoCity Lite database by Maxmind is not good enough for the kind of lookups I need to do, which is mostly IP addresses owned by ISPs and alike.
In these cases, the Lite version of the database doesn't usually return the city at all and while the full version does, it's a bit pricey for my needs.
So luckily I found another service which seems a good fit for what I am trying to do
http://www.readwriteweb.com/hack/2010/09/saying-hi-quova-style.php
I don't need frequent lookups nor many of them during a day, so this seems to work ok for me (for now), although it's a remote service.
Cheers
Vito
On 8 Jun 2011, at 22:21, cjheath wrote:
On 08/06/2011, at 11:41 PM, vitobotta wrote:
ree-1.8.7-2011.03 :004 > p Object.constants-before
["Autometal", "FileUtils"].... but no Geoip. Weird. I wonder what Autometal is, it sounds
like a loader type thing that might have interfered with the
require process.
501 [ ~ ] $ gem show geoip
ERROR: While executing gem ... (RuntimeError)Oh sorry, I meant "gem open", but "gem list" is also good.
502 [ ~ ] $ gem list geoip
*** LOCAL GEMS ***
geoip (1.1.1)And you're using bundler too? Is the bundle up to date?
Clifford Heath.
Reply to this email directly or view it on GitHub:
#13 (comment)
from geoip.
I believe this issue could be closed 😸
from geoip.
Related Issues (20)
- GeoIP.asn incorrect parsing of some records HOT 4
- Doesn't work with recent version of db HOT 2
- IP2Location LITE Support HOT 2
- Not supported with Maxmind GeoIP2 Country HOT 4
- Include CHANGELOG file to this gem HOT 2
- MMDB format will be supported in furture? HOT 1
- Errno::ENOENT: No such file or directory @ rb_sysopen - GeoIP.dat HOT 2
- Release 1.6 HOT 6
- utf-8 read incorrect HOT 1
- dnsmasq HOT 1
- Very weird bug. Sometime GEO_IP_CITY.city returns incorrect info HOT 1
- .each method always returns empty Enumerable for GeoIPCity.dat database HOT 10
- Missing Hash Outputs for different lookups
- missing 1.6.3 version tag in GitHub HOT 4
- Why is the latitude/longitude an empty string? HOT 1
- DATA_DIR incompatible with kali-rolling HOT 1
- Version unclear HOT 1
- GeoLite Legacy databases are now discontinued HOT 13
- test/csvORG2dat.py does not support python3 HOT 1
- Reporting Abuse on GeoIP HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geoip.