Ignore me, I'm an idiot.

The model had a belongs_to specified but there weren't any records for
it to belong to... :(

/me FAILS

M.

On 7 March 2011 19:53, Matthew Macdonald-Wallace <[email protected]> wrote:
> OK,the install works fine, so thanks for that.
>
> I'm now trying to insert into a dm model and I've added the following
> to the class:
>
> has_geographic_location :geoloc
>
> This creates the tables correctly, however when I try and create a new
> record in the database, I get a blank page (I'm using Sinatra) and
> nothing is inserted into the database.
>
> The code to create the new record is as follows:
>
> gt = Geoitem.create(:resource    => params[:resource],
> :geoloc_lat           => params[:lat],
> :geoloc_lng           => params[:long])
>
> These parameters are received from a POST request and they are set
> according to the Debug Output:
>
> {"resource"=>"test resource", "lat"=>"51.518593787137625",
> "long"=>"-0.04735205640872664"}
>
> Am I doing it wrong?
>
> Thanks,
>
> Matt
>
> On 7 March 2011 17:04, Matthew Macdonald-Wallace <[email protected]> 
> wrote:
>> Thanks Matt (is this getting confusing for anyone else? ;) )
>>
>> I'll try it tonight.
>>
>> Matt
>>
>> On 7 March 2011 16:40, Matt King <[email protected]> wrote:
>>> Hi Matt,
>>> For some reason I haven't been able to figure out updating a gem on Rubygems
>>> with the same version, and the version up on Rubygems right now has a
>>> dependency version error that's been fixed in the github repo.
>>> Here's the gem with the fix:
>>> http://mking.me/dm-geokit-1.0.2.gem
>>> As soon as dm-core 1.1 is released I'll be releasing a compatible version
>>> that should fix this issue. Until then, let me know if you have any more
>>> problems!
>>> Cheers,
>>> -Matt
>>>
>>> On 6 March 2011 23:18, Prof Falken <[email protected]> wrote:
>>>>
>>>> Hi all,
>>>>
>>>> I've encountered exactly the same issue as reported at
>>>> http://groups.google.com/group/datamapper/msg/d2104443c7aa4a39 (dm-
>>>> geokit gem trying to include older versions of dm-core) and I was
>>>> wondering what the fix for this is?
>>>>
>>>> I've updated all my gems and I'm still running into issues when I
>>>> include the following at the top of my model:
>>>>
>>>> require 'dm-core'
>>>> require 'dm-sqlite-adapter'
>>>> require 'dm-geokit'
>>>> require 'dm-migrations'
>>>> require 'dm-aggregates'
>>>>
>>>> I've noticed that there is still a pull-request outstanding on Matt
>>>> King's dm-geokit github repo, however as I'm (very!) new to the world
>>>> of Ruby and Gems, my attempts to compile the source of the pull
>>>> request have failed repeatedly... :(
>>>>
>>>> Any help that can be provided is gratefully accepted!
>>>>
>>>> Thanks in advance,
>>>>
>>>> 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.
>>>>
>>>
>>>
>>>
>>> --
>>> Matt King
>>> [email protected]
>>>
>>> --
>>> 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.

Reply via email to