Questions tagged [rails-geocoder]

Geocoder is a complete geocoding solution for Ruby. With Rails it adds geocoding (by street or IP address), reverse geocoding (find street address based on given coordinates), and distance queries. It’s as simple as calling geocode on your objects, and then using a scope like Venue.near("Billings, MT").

Homepage

Source

397 questions
0
votes
1 answer

Rails geocoding not for a map, not with Google

I'm using the geocoder gem, which by default uses Google for geocoding. However the Google terms of service do not probably allow usage that does not immediately show on a Google Map. Likewise Bing I think. Is anyone using a geocoding service that…
matanster
  • 15,072
  • 19
  • 88
  • 167
0
votes
1 answer

Error 13038: Can't find any special indices: 2d (needs index), 2dsphere (needs index)

I've been searching for this for so many hours. Everytime I call the 'near' method on my Model, it gives the following error: 2.0.0p247 :001 > Status.near(@coordinates, 10).to_a Moped::Errors::QueryFailure: The operation: #
Sheharyar
  • 73,588
  • 21
  • 168
  • 215
0
votes
2 answers

search nearby location with country name not working with geocoder

I'm trying to get nearby users from a given location. I have users latitude and longitude(I'm taking out from their address). Now when I'm searching a term like 'NC' its showing some of its results, But when I'm searching with the country name…
Sachin Prasad
  • 5,365
  • 12
  • 54
  • 101
0
votes
2 answers

Manual mock for Geocoder

How could I mock any method without using any gem? Suppose I have access to an complex object like request How could I make request.location.country to return a mocked value. I read I can mock geocoder results with gems, but I would like to know a…
sites
  • 21,417
  • 17
  • 87
  • 146
0
votes
2 answers

Implement the gecoder gem in nested resource loop?

I implemented the geocoder gem based on the tutorial on http://railscasts.com/episodes/273-geocoder This is a part of the house show view template - @house.location.nearbys(20, {:order => :distance, :units => :km}).each do |house| %li =…
0
votes
1 answer

Geocoder + Rails 3.2 // SQLException: no such column: distance:

I keep getting the same error when I try to apply Geocoder gem to my search form. You will see 2 different queries in Event Controller. If I use them on their own they work great. But, I use them together, as shown here, it does throw the…
Sergio Nekora
  • 319
  • 1
  • 5
  • 19
0
votes
1 answer

Validating longitude / latitude with geocoder gem

I followed this Geocoder Railscast & I'm playing around with it to see if I can add validation to the longitude & latitude coordinates returned by the Geocoder Gem incase the user inputs a faulty address that does not return any longitude & latitude…
Holly
  • 7,462
  • 23
  • 86
  • 140
0
votes
1 answer

Json, Rails Geocoder and Gmaps for Rails

With Ruby Geocoder I am able to convert address to latitude and longitude and then display it with google static map. However, when trying to use gmap for rails I am getting a blank container. view - html.erb Static Map <%= image_tag…
nil
  • 2,238
  • 1
  • 19
  • 28
0
votes
1 answer

Tabbed menus broke my geocoder search functionality

I'm fairly new to Ruby on Rails, making a directory type of website as a personal project to learn. In my app, I implemented Geocoder search so the user can search for places/locations near them, the search worked perfect. But then when I added…
Farooq
  • 1,925
  • 3
  • 15
  • 36
0
votes
1 answer

rails 3 multiform geocoder

Using railscast 217 (multistep/wizard) from and geocoder. What I want to do is have the user enter a meeting location on the first part of the form, then on the second part of the form have geocoder return a list of addresses that geocoder has…
0
votes
1 answer

Populate visitors IP address in the controller for Geocoder near() query

I want to grab the visitors IP address and use it in my controller so that I can use geocoder to find nearby objects. So I have a Location model, and I want to run a query like this: def index @json = Location.near('visitor location here',…
Aaron Mills
  • 172
  • 1
  • 14
0
votes
0 answers

Can I use 'near' method in Geocoder to check two models?

I have 2 models: Business and Program. class Business < ActiveRecord::Base has_many :programs class Program < ActiveRecord::Base belongs_to :business Businesses have many programs. Both businesses and programs have latitude and longitude columns…
user527662
  • 363
  • 5
  • 14
0
votes
1 answer

Geocoder in Rails with MongoMapper

I have used geocoder in my ruby on rails application for a while but when I moved computer I can't get it working with the include statement in my model. I use a Mongo database and keep getting this error: uninitialized constant…
jotun
  • 97
  • 8
0
votes
2 answers

get city, country and ip from a visitor on production mode with rails 3.2

I have installed http://www.rubygeocoder.com/ in a project rails in a production server but this gem in my production server not works fine for me... I'm using mongoid. I write these methods in views in my development environment and works fine: <%=…
hyperrjas
  • 10,666
  • 25
  • 99
  • 198
-1
votes
2 answers

Google API error: over query limit. rails 4

The issue is I keep hitting the OVER_QUERY_LIMIT error when trying to geocode gem locations on a Google Map . I understand that there is a limit to the rate at which you can call the geocoder (as well as the daily limit on total volume), so I need…
1 2 3
26
27