CouchDB views erroring out

这一生的挚爱 提交于 2019-12-24 00:39:13

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!