Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0EBB29D4C for ; Thu, 8 Dec 2011 16:05:56 +0000 (UTC) Received: (qmail 77672 invoked by uid 500); 8 Dec 2011 16:05:54 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 77632 invoked by uid 500); 8 Dec 2011 16:05:54 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 77624 invoked by uid 99); 8 Dec 2011 16:05:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Dec 2011 16:05:54 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of drjasonwoodruff@gmail.com designates 209.85.160.180 as permitted sender) Received: from [209.85.160.180] (HELO mail-gy0-f180.google.com) (209.85.160.180) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Dec 2011 16:05:48 +0000 Received: by ghrr14 with SMTP id r14so1990047ghr.11 for ; Thu, 08 Dec 2011 08:05:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=g1ZpOZlAHp6y/7EAT+okJ/yncZajmlF8R8b03k1oalo=; b=jeNMR0C5msvkQJAITlUyYIvGicxBBU9AuK7pwzyalE8T8U3Jx7UK3QW6YuAxeI/V4f l3T3PymUIgsFethc5i+PlzLHkYoD94wv3/NSzz9S3/54Q3jAaaVP4PXJ6es6AmVqyL8Q paCdzFslLzBjOp4OQovh0zs1g8/27sokODmcA= MIME-Version: 1.0 Received: by 10.236.92.168 with SMTP id j28mr5408640yhf.59.1323360327321; Thu, 08 Dec 2011 08:05:27 -0800 (PST) Reply-To: jasonwoodruff@btinternet.com Sender: drjasonwoodruff@gmail.com Received: by 10.101.36.16 with HTTP; Thu, 8 Dec 2011 08:05:27 -0800 (PST) In-Reply-To: References: Date: Thu, 8 Dec 2011 16:05:27 +0000 X-Google-Sender-Auth: eXNKubApGdLjGUIQSD30FC8FeeE Message-ID: Subject: Re: couchapp on node.js From: Jason Woodruff To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=20cf301afb353848cf04b396d684 X-Virus-Checked: Checked by ClamAV on apache.org --20cf301afb353848cf04b396d684 Content-Type: text/plain; charset=ISO-8859-1 Ryan Yes, I'd just found that very same entry when your email arrived. This is exactly it. Thank-you for the reply. Unfortunately, it would seem that the definitive guide isn't quite so definitive as it could be! Thanks Jason On 8 December 2011 15:49, Ryan Ramage wrote: > There are a few different 'couchapp' tools kicking around. Some have > different project structures. See here: > > http://couchapp.org/page/index > > Sounds like you are trying to use the node.couchapp.js on a CouchApp > command line tool (python) project. > > From the wiki: > "Note that you cannot use Python couchapp to push couchapps written > using node.couchapp.js into Couch and vice versa." > > > > > > > > > On Thu, Dec 8, 2011 at 8:41 AM, Jason Woodruff > wrote: > > Beginning to answer my own question. > > > > The app.js file in the sofa app doesn't have the same structure as those > > created by couchapp boiler. > > > > Is the sofa app out-of-date to be learning couchdb with? In which case > > should I be bothering with the definitive guide? > > > > Jason > > > > On 8 December 2011 15:16, Jason Woodruff >wrote: > > > >> Hi > >> > >> I'm experiencing some strange behaviour with couchapp on node.js. > >> > >> For example, I receive a 'could not create' message, even though the > app > >> is created? > >> > >> $ couchapp boiler test3 > >> Could not create /home/jason/CouchApps/test3 > >> ........................??????? > >> > >> And, so as to prove it, I can then push it to the db > >> > >> $ couchapp push app.js http://127.0.0.1:5984/test3 > >> Preparing. > >> Serializing. > >> PUT http://127.0.0.1:5984/test3/_design/app > >> Finished push. 1-72b18a3b961a0f16fa9f988cb9c28da2 > >> > >> I've cloned Chris Anderson's 'sofa' blog app. > >> > >> git clone git://github.com/jchris/sofa.git > >> > >> But despite every which way I can think of I cannot get it to push to > the > >> db. > >> > >> I'm using > >> > >> couchapp push app.js http://127.0.0.1:5984/[new empty db] > >> > >> I've called this from the sofa, _attachment and script directories. > >> Nothing works. Running from the /script directory this is the error: > >> > >> node.js:201 > >> throw e; // process.nextTick error, or 'error' event on first > tick > >> ^ > >> ReferenceError: $ is not defined > >> at Object. > >> (/home/jason/CouchApps/sofa/_attachments/script/app.js:1:63) > >> at Module._compile (module.js:432:26) > >> at Object..js (module.js:450:10) > >> at Module.load (module.js:351:31) > >> at Function._load (module.js:310:12) > >> at Module.require (module.js:357:17) > >> at require (module.js:368:17) > >> at Object. > >> (/usr/local/lib/node_modules/couchapp/bin.js:78:24) > >> at Module._compile (module.js:432:26) > >> at Object..js (module.js:450:10) > >> > >> Pulling sofa into /usr/local and going through the same process of > running > >> the command from the /script directory I get a different error. > >> > >> node.js:201 > >> throw e; // process.nextTick error, or 'error' event on first > tick > >> ^ > >> Error: Cannot find module 'app.js' > >> at Function._resolveFilename (module.js:334:11) > >> at Function._load (module.js:279:25) > >> at Module.require (module.js:357:17) > >> at require (module.js:368:17) > >> at Object. > >> (/usr/local/lib/node_modules/couchapp/bin.js:78:24) > >> at Module._compile (module.js:432:26) > >> at Object..js (module.js:450:10) > >> at Module.load (module.js:351:31) > >> at Function._load (module.js:310:12) > >> at Array.0 (module.js:470:10) > >> > >> > >> Is this all a bit buggy, or am I making a horlicks of things? > >> > >> Thanks > >> > >> Jason > >> > >> > >> > >> > >> > > > > -- > Twitter: @eckoit > http://eckoit.com - Keep what you hear. > http://opendoorstories.com - Create Experiences > --20cf301afb353848cf04b396d684--