我正在尝试使用couchapp,couchdb来构建一个示例应用程序。我还使用jquery.couch.js插件与我本地的couchdb进行通信。但是,当我尝试将其复制到我在iriscouch.com上的远程沙发时,我得到了以下错误:
Replication failed: {error,
{{badarg,
[{erlang,list_to_existing_atom,["data_size"]},
{couch_rep,'-dbinfo/1-lc$^0/1-0-',1},
{couch_rep,'-dbinfo/1-lc$^0/1-0-',1},
{couch_rep,do_init,1},
{couch_rep,init,1},
{gen_server,init_it,6},
{proc_lib,init_p_do_apply,3}]},
{child,undefined,"6f5beff2bd381e02b602cee2e8e1e86d",
{gen_server,start_link,
[couch_rep,
["6f5beff2bd381e02b602cee2e8e1e86d",
{[{<<"source">>,<<"zwaroop">>},
{<<"target">>,
<<"http://username:password@swaroopsm.iriscouch.com/zwaroop">>}]},
{user_ctx,<<"root">>,
[<<"_admin">>],
<<"{couch_httpd_auth, cookie_authentication_handler}">>}],
[]]},
temporary,1,worker,
[couch_rep]}}}我哪里错了?
发布于 2012-12-12 08:57:45
如果您使用的是Ubuntu12.04(随CouchDB v1.0.1一起提供),那么您可以使用CouchDB而不是从源代码安装PPA。例如,为了精确起见,https://launchpad.net/~novacut/+archive/daily有一个1.2.0的后端口;我将它安装在
$ sudo apt-add-repository ppa:novacut/daily
$ sudo apt-get update
$ sudo apt-get install couchdb在升级到1.2.0之后,这个问题就解决了。
编辑: Novacut存储库不再托管couchdb的软件包,因为1.5.0版本已经包含在Ubuntu Trusty (http://packages.ubuntu.com/trusty/couchdb)中。
发布于 2012-07-23 07:56:56
我想知道这是不是版本不匹配?您在本地系统上使用的是什么版本的CouchDB?
无论如何,一种快速的解决方法是编辑CouchDB的源代码,并在代码中的任意位置插入data_size。
例如,src/couchdb/couch_doc.erl
-spec to_path(#doc{}) -> path().
to_path(#doc{revs={Start, RevIds}}=Doc) ->
data_size, % This no-op expression allows list_to_existing_atom
[Branch] = to_branch(Doc, lists:reverse(RevIds)),
{Start - length(RevIds) + 1, Branch}.然而,希望我们能通过识别你的版本找到比这更好的东西。
https://stackoverflow.com/questions/11602182
复制相似问题