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").
Questions tagged [rails-geocoder]
397 questions
0
votes
1 answer
gmaps4rails gem v2.0.4 marker changes position every time the page is refreshed
I apologize in advance if this question is stupid/not being asked correctly, this is my first post in stackoverflow and I'm completely new at RoR...
I have a rails application which uses the gem gmaps4rails v2.0.4. The application takes in an…

ralphie02
- 5
- 6
0
votes
1 answer
Geocoder with One to Many realtionship Ruby on Rails
I have two models in my Rails app which form a one_to_many relationship. The first model, store, represents a brick and mortar store and has latitude and longitude columns which are being geocoded correctly using the 'geocoder' gem and an address…

saskcan
- 178
- 6
0
votes
1 answer
Can you find the country of a mobile user based on ip ? (Rails 3.2/geocoder gem)
I need to customize website based on country of user. I want to use geocoder gem.
Can these type of tools and geocoder gem specifically find the country of a user using a mobile device (mobile phone, tablets...) ? or does it only work for set/fixed …

Mathieu
- 4,587
- 11
- 57
- 112
0
votes
1 answer
rails geocoder undefined method `full_street_address'
i tried to add the gem Geocoder to my App, but i can't figure out how i get the Geotagging to work.
My Model looks like this:
class Home < ActiveRecord::Base
geocoded_by :full_street_address
after_validation :geocode
end
And i my Form i added…

Kirsche
- 44
- 6
0
votes
1 answer
Gmaps4Rails: Plot markes/pointers randomly within a given range
Given latitude and longitude of a location say 27.1231 and 72.3454 how do I randomly plot points within a circle of radius say 10km with the above lat and log as the center?
It's somewhat similar to this (?)
EDIT
It's a geocoder question and not…
user2675010
0
votes
1 answer
Extract nested object of an object collection (products of location)
I have two models : Product and Location.
class Location
has_many :products
end
class Product
belongs_to :location
end
When I use the geocoder gem, I can use a near scope, that allow me to select every location around a specific address.…

Flo Rahl
- 1,044
- 1
- 16
- 33
0
votes
1 answer
Fetch and Store Latitude / Longitude API
Looking into the geocoder gem for Rails, I'm trying to find an API where I can pass an address, get results back that include latitude and longitude, and be able to store only the latitude and longitude in my app's database.
Has anyone found a…

CDub
- 13,146
- 4
- 51
- 68
0
votes
1 answer
How to present region in Google query
I am using rails geocoder. So far just been using it directly not via ActiveRecord/Mongoid etc.
I would like to in my Google request specify the region, e.g. 'au'
What do I need to in combination with (or instead of) Geocoder.search to achieve this?

Martin Capodici
- 1,486
- 23
- 27
0
votes
1 answer
Method of getting current location from IP address in Rails (geocoder and gmaps4rails gems)
I have an app which allows users to post Offers based on address they choose. I would like to add the option of saving the address based on the user's current location, determined by the IP address. I'm using the ruby Geocoder gem. This code will…

user2514224
- 187
- 2
- 14
0
votes
1 answer
rake db populate with geocoder
I want to populate my database with 300 users and products, but the process is too fast, and so are the requests to Google API. How can I slow it down ? (1 request every second max).
I tried that in the config/environments/development.rb but it…

Flo Rahl
- 1,044
- 1
- 16
- 33
0
votes
0 answers
Geocoder gem testing ip request
I want to test the following line in my view :
app/views/products/index.html.erb
<%= render @products %>
app/views/products/_product.html.erb
<%= distance_between(@current_location, product.location) %>
The @products and…

Flo Rahl
- 1,044
- 1
- 16
- 33
0
votes
1 answer
Rails can't generate migration for RailsGirlsBerlin App
Edit: the problem was in the routing how I named it.
The problem routing code was
get :to => redirect('attendees#index')
The fixing code was
match "/attendees", to: 'attendee#index', via:'get'
I'm going through the RailsGirls app tutorial and…

jmoon90
- 339
- 4
- 17
0
votes
1 answer
How to find the users within 10miles using latitude and longitude of the user in rails?
I have latitude and longitude of all the user. I have to find the user who is near to me (around 10 miles) from my current latitude and longitude. And i have to give it as response in json. I have tried to configure geokit gem for this but it showed…

logesh
- 2,572
- 4
- 33
- 60
0
votes
1 answer
Rails + Geocoder: undefined method `search' for Geokit::Geocoders::Geocoder:Class
I am playing with the Geocoder gem, I added this code to user model
include GeoKit::Geocoders
geocoded_by :full_street_address # can also be an IP address
after_validation :geocode # auto-fetch coordinates
and in a different…

user984621
- 46,344
- 73
- 224
- 412
0
votes
2 answers
Setting up Rails Geocoder with Personal API Key
Rails Geocoder says not to use Key for Free version, to instead only use the key for Premier. The site i'm maintaining seems to be going over the limit not, so I set up a new api key and enabled billing.
I setup my initilizer like so
…

nil
- 2,238
- 1
- 19
- 28