couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject ERROR when querying view in design document
Date Fri, 28 May 2010 00:14:32 GMT
Hi, I am very very new to couchDB and am currently following a tutorial on 
design documents in which I have completed the following steps using my 
ubuntu 9.04 terminal with couchDB 0.8.0 incubating:

1. Create a .json file with the following code:

  "_id" : "_design/example",
  "views" : {
    "foo" : {
      "map" : "function(doc){ emit(doc._id, doc._rev)}"

2. Use curl to PUT the file to CouchDB (creating a database also)
curl -X PUT
curl -X PUT -d @mydesign.json

....this resulted in a success message:

3. add some empty documents to the database that I can then query:
curl -X POST -d '{}'

4. Now query the view*:

*it is this that gives me the following error:
\"\/basic\/_design\/example\/_view\/foo\",\n              {1,1},\n  {3,\n  
            {\"user-agent\",\n                {'User-Agent',\n  
\"curl\/7.18.2 (i486-pc-linux-gnu) libcurl\/7.18.2 OpenSSL\/0.9.8g 
zlib\/ libidn\/1.10\"},\n                {\"host\",\n  
{'Host',\"\"},\n {\"accept\",{'Accept',\"*\/*\"},nil,nil},\n 
                nil},\n                nil}}},\n          'GET',\n  
{couch_httpd,handle_request,2},\n     {mochiweb_http,headers,4},\n 

...Any idea why??? I need to get this working ASAP because my boss is 
getting angry!

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message