I have hit an interested Problem. I am using ruby 1.9.3 and rails 3.2.3
I am wanting to integrate the geocoder gem with devise. I have added three additional attr_accessible into my user model created by devise which are “address, latitude and longitude”. I have created a migration to add these tables to the database (I am using sqlite3).
I have added an address field in the devise sign up view for when people sign up and placed the following at the end of my user model
geocoded_by :address
after_validation :geocode
Now when a user signs up and enters their email address, password and ADDRESS.. Geocoder successfully places the correct latitude value into the database however leaves the longitude blank?? Has anyone had this issue?? I think it’s quite an interesting task to successfully track each user upon sign up. However I need both latitude and longitude addresses!
Any suggestions please fire away! 🙂
I fixed this issue by creating a new rails application and then install devise and geocoder at the same time. I migrated additional attributes to the devise and added these in the user model, and all seemed to work fine.
If any people encounter any issues then get in touch!