问题
I've been playing with CouchDB (and the RelaxDB ruby library) but creating a view and then trying to access it causes a nasty non specific error. I stepped back a step because I thought RelaxDB might be incompatible with the CouchDB version I'm using(0.8.1), but even when I create a new database and equivalent views and call it by manually hitting the URL it still doesn't work.
[info] [<0.13529.0>] HTTP Error (code 500): {'EXIT',
{function_clause,
[{couch_httpd,handle_db_request,
[{mochiweb_request,#Port<0.9282>,'GET',
"/hello/_design/app/_view/Accounts_all?reduce=false",
{1,1},
{2,
{"accept",
{'Accept',"*/*"},
nil,
{"host",{'Host',"localhost:5984"},nil,nil}}}},
'GET',
{"hello",<0.157.0>,
["_design","app","_view",
"Accounts_all"]}]},
{couch_httpd,handle_request,2},
{mochiweb_http,headers,4},
{proc_lib,init_p_do_apply,3}]}}
回答1:
I think you are using the 0.9 API with a 0.8 version of the software. See the wiki Breaking Changes document. You need to be accessing /hello/_view/app/Accounts_all
, or consider upgrading to the newly-released CouchDB 0.9.
回答2:
Check the log files for more specific information; IIRC the external response just give the 500 to prevent leaking configuration information to outsiders. If that doesn't help you, edit the question to include what you found and see if any of us can suss it out.
来源:https://stackoverflow.com/questions/718039/couchdb-views-erroring-out