I tried making a completely new model called locations that doesn't interact
with my application at all. Whenever I put in has_geographic_location I'm still
getting the same error even with dm-validations included.
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 <[email protected]>:
> On 27 September 2010 07:53, <[email protected]> wrote:
>
> > 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 did realize that I put in an option on defining the geographic property
> that made it stop failing when dm-validations is included, however now it
> fails when dm-validations *isn't* included. :-P
>
> Can you try including dm-validations as well? Also, if you check the spec
> directory in spec_helper.rb there are definitions that all pass. You may
> double check what you're doing vs. what's in the spec.
>
> -Matt
>
> --
> You received this message because you are subscribed to the Google Groups
> "DataMapper" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/datamapper?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/datamapper?hl=en.