Closed jspooner closed 13 years ago
Has any one tested with Postres database?
I learned that you have to cast variables like this lng::numeric but still haven't finished a working version.
I started a fork for it here https://github.com/jspooner/geocoder/blob/master/lib/geocoder/stores/active_record.rb
What data type is your lat
column? You shouldn't have to cast if it's a float. A lot of people (myself included) are using Geocoder with Postgres and on Heroku and haven't had this problem so we'll have to figure out what's different about your environment and/or app.
ha. my lat/lng columns were created long before geocoder and were set to string. I'll change it to float and close this issue if it works. Thanks for the great gem.
The near method works great on my localhost but it's throwing this PGError when pushed to heroku.
ActiveRecord::StatementInvalid (PGError: ERROR: operator does not exist: numeric - character varying LINE 1: ...58.755864232 * 2 * ASIN(SQRT(POWER(SIN((37.358151 - lat) * P...