Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 85479 invoked from network); 25 Sep 2010 11:54:53 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 Sep 2010 11:54:53 -0000 Received: (qmail 68985 invoked by uid 500); 25 Sep 2010 11:54:53 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 68595 invoked by uid 500); 25 Sep 2010 11:54:50 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 68587 invoked by uid 99); 25 Sep 2010 11:54:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Sep 2010 11:54:48 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of randall.leeds@gmail.com designates 209.85.161.52 as permitted sender) Received: from [209.85.161.52] (HELO mail-fx0-f52.google.com) (209.85.161.52) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Sep 2010 11:54:43 +0000 Received: by fxm17 with SMTP id 17so3033413fxm.11 for ; Sat, 25 Sep 2010 04:54:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=D7yIbggJJmGZuXPld2ZdNeFJv/D1dQZjJ4IyfelIpBI=; b=JBoZxrh0OY+t4LyL+Dn3isWb+lCXqfuVb3SHRqoVSzEg2hMLVbcHHNL+lRzzKV3wVr SQLvZY5GGXVOtXwn5UAdA3IzoB9v1iPFznoh4zha9PDCTtigLVz1fG/WO5Tkqw/g/ZvU OauuxPxVRY6UkUkNM5qqCzvwvjwvryIAEG628= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=SiN807XEiO7y5jRiQcnuFM07yRpzOMJGwGGKh0NxyZdfnDmix7feLULYP/AyvUGLs0 7M4UGTMEwma05UOwDr2W57kBMltFhi7lfQtnXR4nIVOaiNOH8czwzHkbW/6ZMwWoKNcS 8zu7Zh53lpX6zdpKM2N7ZvaXP6ESHk/rhI3N0= MIME-Version: 1.0 Received: by 10.223.118.6 with SMTP id t6mr2633718faq.61.1285415662105; Sat, 25 Sep 2010 04:54:22 -0700 (PDT) Received: by 10.223.111.141 with HTTP; Sat, 25 Sep 2010 04:54:22 -0700 (PDT) In-Reply-To: References: Date: Sat, 25 Sep 2010 13:54:22 +0200 Message-ID: Subject: Re: Simple erlang and erl question From: Randall Leeds To: dev@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable If you want to interactively play with couchdb code in erlang you should run couchdb with the -i flag (lower-case I ["eye"]). This will load all the necessary applications and dependencies. On Sat, Sep 25, 2010 at 04:14, chongqing xiao wrote: > Understand. Anyhow, I figured out the problem. It is because I have to > load "couch_stats_collector" first in order to use "couch_file". > I am surprised even "couch_file" depends on "couch_stats_collector", > the dependency is not explicitly defined in "couch_file". > > Chong > > On Fri, Sep 24, 2010 at 2:57 PM, Robert Newson = wrote: >> A mailing list is not a great medium for learning a new programming >> language or getting up to speed with a new code base. >> >> Try this for the former http://oreilly.com/catalog/9781934356005 and >> #couchdb for the latter. >> >> B. >> >> On Fri, Sep 24, 2010 at 8:39 PM, chongqing xiao wrote= : >>> My bad. Now I get this >>> >>> 10> couch_file:open("ttt"). >>> ** exception exit: undef >>> =C2=A0 =C2=A0 in function =C2=A0couch_stats_collector:track_process_cou= nt/1 >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0called as couch_stats_collector:track_proces= s_count({couchdb, >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 open_os_= files}) >>> =C2=A0 =C2=A0 in call from couch_file:init/1 >>> =C2=A0 =C2=A0 in call from gen_server:init_it/6 >>> =C2=A0 =C2=A0 in call from proc_lib:init_p_do_apply/3 >>> >>> 13> couch_file:open("c:ttt",[create]). >>> >>> Crash dump was written to: erl_crash.dump >>> eheap_alloc: Cannot allocate 729810240 bytes of memory (of type "heap")= . >>> >>> >>> Abnormal termination >>> >>> Thanks >>> Chong >>> >>> On Fri, Sep 24, 2010 at 1:48 PM, chongqing xiao wrot= e: >>>> Hi, >>>> >>>> I was learning erlang and couchdb using the erl and I got the >>>> following error when I tried to use couch_file in erl shell. >>>> Could someone explain what might be the problem? I am guessing >>>> couch_file is not the actual module but I can't figure out how to get >>>> that. >>>> >>>> =E0=B8=80Eshell V5.8.1 =C2=A0(abort with ^G) >>>> 1> c("c:/couchdb/src/couchdb/couch_file", [{outdir, >>>> "c:/couchdb/src/couchdb/"}]). >>>> {ok,couch_file} >>>> 2> couch_file.open("c:/test"). >>>> ** exception error: bad function 'couch_file.open' >>>> >>>> Thanks >>>> Chong >>>> >>> >> >