Google Geolocation

18 views
Skip to first unread message

BeeRich

unread,
Feb 5, 2014, 7:26:46 PM2/5/14
to Submit Rails
Hi folks. Trying to get google-geo to work, but I am seeing errors.

#!/usr/bin/ruby

require 'Google-geo'

mykey = 'blahblahblah'
addy1 = '1600 Amphitheatre Parkway, Mountain View, CA' # 37.42246, -122.08394

geo = Google::Geo.new mykey
res = geo.locate addy1
puts res.coordinates

…and the error:

/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- Google-geo (LoadError)
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from pdev.rb:6:in `<main>'

Not sure why it can’t load it as it’s just installed. I can’t get anything to work in irb either.

Any advice appreciated.

Cheers

Hassan Schroeder

unread,
Feb 5, 2014, 8:36:45 PM2/5/14
to rubyonrails-talk
On Wed, Feb 5, 2014 at 4:26 PM, BeeRich <bee...@gmail.com> wrote:
> Hi folks. Trying to get google-geo to work, but I am seeing errors.
>
> #!/usr/bin/ruby
>
> require 'Google-geo'

> pry
2.0.0 (main):0 > require 'google/geo'
=> true

HTH,
--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
Reply all
Reply to author
Forward
0 new messages