incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <paul.joseph.da...@gmail.com>
Subject Re: Upgrading from 1.1.0 to 1.1.1 views stopped working
Date Wed, 07 Dec 2011 19:16:23 GMT
The version numbers associated with SpiderMonkey are all kinda wonky.
The 1.9.1 is actually referring to the xulrunner package which
includes something between SpiderMonkey 1.8.0 and 1.8.5.

I'm not super familiar with Debian's versioning/stable/unstable stuff
but I do know that they have a libmozjs package that packages a fairly
random mercurial sha that's newer than what works by default.

2011/12/7 Niklas Närhinen <niklas@narhinen.net>:
> Hi, thanks for your reply.
>
> I found the corresponding Jira issue. Wrapping the anonymous function in
> parentheses did also work.
>
> http://packages.debian.org/sid/couchdb states that SpiderMonkey has to be
> 1.9.1 or newer, so I guess that's the problem I'm facing. So it seems
> couchdb on debian sid is kinda broken, as in old apps may stop working.
>
> Niklas
>
>
> 7.12.2011 17.26, Paul Davis kirjoitti:
>>
>> Looks like you've got a Spidermonkey that's too new for CouchJS. You
>> can either change that to something older or you should be able to
>> change your map function to something like:
>>
>> function map(doc) {
>>     if(doc.type&&  doc.type == "care_target") {
>>
>>         emit([doc.customer, doc.name], {name: doc.name});
>>     }
>> }
>>
>> 2011/12/7 Niklas Närhinen<niklas@narhinen.net>:
>>>
>>> Hi,
>>> it seems something has changed in the way how couchdb transforms the json
>>> strings to map etc functions.
>>>
>>> Here is what I'm getting after upgrading to 1.1.1 and querying a view (in
>>> futon):
>>>
>>> Error: compilation_error
>>>
>>> Expression does not eval to a function. ((new String("function(doc)
>>> {\n\tif
>>> (doc.type&&  doc.type == \"care_target\") {\n\t\temit([doc.customer,
>>>
>>> doc.name], {name: doc.name});\n\t}\n}")))
>>>
>>> Any ideas? (btw, both 1.1.0 and 1.1.1 are from debian unstable)
>>>
>>> Niklas
>
>

Mime
View raw message