I am currently working on a sinatra app using datamapper and I would
like to use the geokit gem. The last time anyone touched the geokit
gem was about a year ago and it is still using datamapper version
0.10.2. I have been trying to get it up and running on dm 1.0.0. I
kept getting 3 for 2 arguement errors on the
property_to_column_name_with_distance method and deleted the qualifer
variable that was getting passed in and that fixed that issue. Now on
my login, the login works fine until after authenticating the user I
try to grab the ID. Then I get this error undefined method `field' for
#<DataMapper::Query::Operator @target=:all @operator=:count>.
It appears to be a conflict with the adapter.rb file in datamapper.
Quoting Mike S <mskw...@purdue.edu>:
> --
> You received this message because you are subscribed to the Google Groups
> "DataMapper" group.
> To post to this group, send email to datam...@googlegroups.com.
> To unsubscribe from this group, send email to
> datamapper+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/datamapper?hl=en.
>
>
Have you worked on this at all Matt? I still can't get
has_geographic_address working.
--
You received this message because you are subscribed to the Google Groups "DataMapper" group.
To post to this group, send email to datam...@googlegroups.com.
To unsubscribe from this group, send email to datamapper+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/datamapper?hl=en.
DataMapper::RepositoryNotSetupError: Adapter not set: default. Did you forget to
setup?
Is this something you are aware is not currently working or is there something
on my end that is conflicting with the way dm-geokit is working?
Quoting arbales <arb...@gmail.com>:
> datamapper+...@googlegroups.com.
I've included the new version of you gem + dm-migrations and dm-is-versioned,
but I'm still getting errors whenever I try to add has_geographic_location to
any of my models. The error I am getting is:
DataMapper::RepositoryNotSetupError: Adapter not set: default. Did you forget to
setup?
Is this something you are aware is not currently working or is there something
on my end that is conflicting with the way dm-geokit is working?
I can currently do most things. Instead of using has_geographic_location I'm
just using
newAddress = Geokit::Geocoders::YahooGeocoder.geocode "#{address.address},
#{address.city} #{address.state}, #{address.zip}"
and then running an .each loop on all the addresses in my model using a
newAddress2 = Geokit::Geocoders::YahooGeocoder.geocode "#{address.address},
#{address.city} #{address.state}, #{address.zip}"
then setting
dis = newAddress.distance_to(newAddress2)
if dis <= 10
//do some code
end
It works, but I'm assuming it's slower than the current method and might have
problems as the site scales.
Quoting Matt King <swd...@gmail.com>: