Message from discussion
Geddy 0.5 & MongoDB
Date: Mon, 29 Oct 2012 12:56:32 -0700 (PDT)
From: Matthew Eernisse <m...@fleegix.org>
To: geddyjs@googlegroups.com
Message-Id: <1b07b173-bfa0-4158-ab31-7752c3d0a65c@googlegroups.com>
In-Reply-To: <2f6f91ae-6339-474f-8734-09121fb505a8@googlegroups.com>
References: <b65795d9-d5bb-4466-b038-f0464c6afb69@googlegroups.com>
<CALvYELBbCBPniqJ4VR+kNXNFJK7smYdEkWVXSN41p+32cB=KvA@mail.gmail.com>
<6d94a7ca-7e2d-4f38-afbe-405ad7d41d4b@googlegroups.com>
<4287e2ee-ad00-488a-b242-bcf48bdc77e1@googlegroups.com>
<24803d4c-4240-46a0-9809-07ae633fe4e2@googlegroups.com>
<2f6f91ae-6339-474f-8734-09121fb505a8@googlegroups.com>
Subject: Re: [geddyjs:158] Geddy 0.5 & MongoDB
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_790_22385311.1351540592873"
------=_Part_790_22385311.1351540592873
Content-Type: multipart/alternative;
boundary="----=_Part_791_17641860.1351540592874"
------=_Part_791_17641860.1351540592874
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
No, there was a real bug in the MongoDB adapter for JS Model. It has been=
=20
fixed and published to NPM. Please update Geddy ("npm update -g geddy") and=
=20
try on Windows. Things should work fine now.
Matthew
On Monday, October 29, 2012 12:53:44 PM UTC-7, Gerard Nesta wrote:
>
> Well i've got news about this.=20
> I am on Windows 7 x64 and a friend of mine tried my app on a Mac, and he=
=20
> got it to work.
> So it must be something about the OS.
> yeah, i know i should be using MacOS or Linux...
>
> thanks.
>
> El domingo, 28 de octubre de 2012 16:53:23 UTC+1, Gerard Nesta escribi=C3=
=B3:
>>
>> Yes that's exactly the proceeding, or the little bit different one from=
=20
>> the tutorial.
>>
>> Let's see if some one can figure this out... Thanks.
>>
>> On Sunday, October 28, 2012 4:40:38 PM UTC+1, mistermojo wrote:
>>>
>>>
>>> Hi all,
>>>
>>> I'm afraid I can confirm this problem. This is what I did (no editing o=
f=20
>>> generated stuff except config):
>>> 1. upgraded to geddy 0.5.5
>>> 2. created a new geddy app
>>> 3. created a scaffold (called todoItem) with 3 properties
>>> 4. ran the geddy app
>>>
>>> With geddy using the memory adapter it all works fine. Listing, viewing=
,=20
>>> creating, editing, deleting works fine. No errors.
>>>
>>>
>>> When I changed config in development.js to mongo
>>> """
>>> /*
>>> , model: {
>>> defaultAdapter: 'memory'
>>> }
>>> */
>>>
>>> , model: {
>>> defaultAdapter: 'mongo'
>>> }
>>> , db: {
>>> mongo: {
>>> dbname: 'anothertodo'
>>> }
>>> }
>>> """
>>>
>>> 0. npm installed a fresh mongodb-wrapper
>>>
>>> 1. listing works
>>> 2. creating an item kills the worker
>>> """
>>>
>>> /home/dev/GeddyJS/anothertest/node_modules/mongodb-wrapper/node_modules=
/mongodb/lib/mongodb/connection/server.js:359
>>> throw err;
>>> ^
>>> ReferenceError: model is not defined
>>> """
>>>
>>> but curiously the item is created and can be verified with a geddy=20
>>> restart
>>>
>>> 3. viewing the edit page for the item works.
>>> 4. removing the item works (without errors)
>>> 5. editing and saving kills the worker with error:
>>> """
>>>
>>> /usr/lib/node_modules/geddy/node_modules/model/lib/adapters/mongo/index=
.js:240
>>> if (data instanceof model.ModelBase) {
>>> ^
>>> ReferenceError: model is not defined
>>> """
>>> 6. restarting geddy shows that actually, the save works.
>>>
>>> I am afraid I don't know geddy well enough to pin-point the problem.=20
>>> Creating and updating items in with mongo kills the worker and the app=
=20
>>> hangs but apparently, *after* doing the writing to db. Very curious. Di=
d=20
>>> not have this problem before when I was still using 0.5.2 (and possibly=
=20
>>> older mongodb-wrapper)
>>>
>>> Could it be some weird incompatibility with a new mongodb-wrapper? I=20
>>> don't know what version I had before, though.
>>>
>>> Sorry for the long post. Thanks for your time.
>>>
>>>
------=_Part_791_17641860.1351540592874
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
No, there was a real bug in the MongoDB adapter for JS Model. It has been f=
ixed and published to NPM. Please update Geddy ("npm update -g geddy") and =
try on Windows. Things should work fine now.<br><br><br>Matthew<br><br>On M=
onday, October 29, 2012 12:53:44 PM UTC-7, Gerard Nesta wrote:<blockquote c=
lass=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px=
#ccc solid;padding-left: 1ex;">Well i've got news about this. <div>I =
am on Windows 7 x64 and a friend of mine tried my app on a Mac, and he got =
it to work.</div><div>So it must be something about the OS.</div><div>yeah,=
i know i should be using MacOS or Linux...</div><div><br></div><div>thanks=
.<br><br>El domingo, 28 de octubre de 2012 16:53:23 UTC+1, Gerard Nesta es=
cribi=C3=B3:<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left=
:0.8ex;border-left:1px #ccc solid;padding-left:1ex">Yes that's exactly the =
proceeding, or the little bit different one from the tutorial.<div><br></di=
v><div>Let's see if some one can figure this out... Thanks.<br><br>On Sunda=
y, October 28, 2012 4:40:38 PM UTC+1, mistermojo wrote:<blockquote class=3D=
"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc soli=
d;padding-left:1ex"><br>Hi all,<br><br>I'm afraid I can confirm this proble=
m. This is what I did (no editing of generated stuff except config):<br>1. =
upgraded to geddy 0.5.5<br>2. created a new geddy app<br>3. created a scaff=
old (called todoItem) with 3 properties<br>4. ran the geddy app<br><br>With=
geddy using the memory adapter it all works fine. Listing, viewing, creati=
ng, editing, deleting works fine. No errors.<br><br><br>When I changed conf=
ig in development.js to mongo<br>"""<br>/*<br>, model: {<br> &nb=
sp; defaultAdapter: 'memory'<br> }<br>*/<br><br>, model: =
{<br> defaultAdapter: 'mongo'<br> }<br>=
, db: {<br> mongo: {<br> db=
name: 'anothertodo'<br> }<br> }<br>"""<br><br>0. np=
m installed a fresh mongodb-wrapper<br><br>1. listing works<br>2. creating =
an item kills the worker<br>"""<br>/home/dev/GeddyJS/anothertest/<wbr>node_=
modules/mongodb-wrapper/<wbr>node_modules/mongodb/lib/<wbr>mongodb/connecti=
on/server.js:<wbr>359<br> throw e=
rr;<br> &n=
bsp; ^<br>ReferenceError: model is not defined<br>"""<br><br>but curi=
ously the item is created and can be verified with a geddy restart<br><br>3=
. viewing the edit page for the item works.<br>4. removing the item works (=
without errors)<br>5. editing and saving kills the worker with error:<br>""=
"<br>/usr/lib/node_modules/geddy/<wbr>node_modules/model/lib/<wbr>adapters/=
mongo/index.js:240<br>  =
; if (data instanceof model.ModelBase) {<br> &=
nbsp; &nbs=
p; ^<br>R=
eferenceError: model is not defined<br>"""<br>6. restarting geddy shows tha=
t actually, the save works.<br><br>I am afraid I don't know geddy well enou=
gh to pin-point the problem. Creating and updating items in with mongo kill=
s the worker and the app hangs but apparently, *after* doing the writing to=
db. Very curious. Did not have this problem before when I was still using =
0.5.2 (and possibly older mongodb-wrapper)<br><br>Could it be some weird in=
compatibility with a new mongodb-wrapper? I don't know what version I had b=
efore, though.<br><br>Sorry for the long post. Thanks for your time.<br><br=
><div></div></blockquote></div></blockquote></div></blockquote>
------=_Part_791_17641860.1351540592874--
------=_Part_790_22385311.1351540592873--