tags:

views:

199

answers:

2

What am I missing here?

When I access /mydatabase/_design/assets/_view/all (CouchDB) I'm getting:

"{"error":"EXIT","reason":"{function_clause,\n    [{couch_httpd,handle_db_request,\n         [{mochiweb_request, ..."

This is my view document:

{"_id":"_design\/assets","_rev":"4243492989","language":"javascript","views":{"all":{"map":"function(doc) { if (doc.type == 'asset') { emit(doc.name, doc); }}"}}}
A: 

How did you create the design doc? It looks like there is a '\' in the _id that shouldn't be there. Can you create a new design doc with an _id of "_design/assets"?

rorr
yes I created the design doc and used _design/assets as id
kristian nissen
+1  A: 

Kristian, your _id is fine. It looks like the error I saw when I used a query that didn't match the API. The view URLs changed in version 0.9. You probably want to upgrade to the new version of CouchDB anyway.

See also this question: http://stackoverflow.com/questions/718039

Troy J. Farrell