REST, Ruby On Rails, CouchDB and Me – Part 3 – CouchDB Up and Running on Windows   Leave a comment

Part 0 – REST, Ruby On Rails, CouchDB and Me

Part 1 – Ruby, The Command Line Version

Part 2 – Aptana IDE For Ruby

Part 3 CouchDB Up and Running on Windows

Part 4 – CouchDB, Curl and RUBY

Part 5 – Getting The Data Ready for CouchDB

Part 6 – Getting The Data Into And Out Of CouchDB

Part 7 – JQUERY,JPlayer and HTML5
THIS JUST IN:

CouchDB 1.1.0 For Windows Released.

From the CouchDB listserver:

On 9 June 2011 21:25, Rob wrote:
>  Hi guys
> I know its not officially supported but I am just wondering if anyone out
> there is working on a Windows release of the latest CouchDB. Otherwise does
> anyone know if it is possible to upgrade an existing 1.0.2 setup to 1.1.0?
>
> Thanks a lot
> Rob
>
Hi Rob,
https://github.com/dch/couchdb/downloads is what you want; I'd use the
R14B03 based release
https://github.com/downloads/dch/couchdb/setup-couchdb-1.1.0+COUCHDB-1152_otp_R14B03.exe

I tweet each new build from @davecottlehuber #couchdb #windows incl
interim ones. More than anything else the windows build needs a wider
group of testers, particularly around load/performance, and feedback
on features/changes that people want.

I am working on getting trunk to build on windows with lots of help
from others on @dev, but currently that's broken.

Any questions feel free to email to the list, or ask me (dch) on
irc://freenode.net/#couchdb.

A+

————————————————————————

THIS INFORMATION SUPERSEDS THE WINDOWS BINARY INSTALLER LISTED BELOW.

BTW: CoucDB mailing lists are maintained here.

—————————————————————-

Installation On Windows

The Apache organization is controlling the development and distribution of CouchDB.  I installed CouchDB on an XP system using the a binary windows installer. The Bible of CouchDB:  “CouchDB The Definitive Guide” is excellent and is available for free online.  The Windows binary installer for Couchdb is referenced from the  Apache Couchdb Wiki Page hereThe Naills Blog discusses basic Windows installation.  If you change the default CouchDB port – you need to be responsible to remembering it.   CouchDB will be running as a Windows Service. Set the Statup type to Automatic and the Log on “Local System”.  Note what version you have just installed. CouchDB is undergoing rapid development and there was a new sub version drop on June 6th.  There have been assorted reports of Couchdb ‘hanging’ or ‘dying’ during certain operation on Windows systems.  I have not been able to replicate these but you should (as with all windows servers) review and set as appropriate the automatic recovery options for the service on the  “Recovery” tab of the service.  You do not need to install from source and compile.

image

clip_image001image

CouchDB General Property Page                CouchDB Log On Property Page             CouchDB Recovery Property Page

Learning By Fooling Around

Ok.  All installed? Let’s check the system out.  BE SURE YOU HAVE REVIEWED THE FIRST FOUR CHAPTERS of: CouchDB The Definitive Guide.  Load up your favorite browser (We like Chrome ourselves) and enter the url:

http://http://127.0.0.1:5984/

you should get back the (JSON) Text:

{"couchdb":"Welcome","version":"1.0.2"}

Now try:

http://http://127.0.0.1:5984/_utils/

(this is the Futon frontend to couchDB).  You should get back something like:

clip_image001[4]

Note you can add a new database from this screen. and then instantly add an (unstructured) document to the database.

clip_image001[6]

Where Futon has, helpfully, given you GUID ID for the document.  ID is the ONLY required field.  We will be discussing Keys and GUIDS and CouchDB in a later posting.  Now Switch To the Fields View and add a new field and value.

clip_image001[8]

Save The Document and drop back to the database level:

clip_image001[10]

Note we have picked up a rev (revision) field. All keys in couchdb are really compound keys.  The Primary Key (aka ID) and the revision number (aka rev). The ID refers to the collection of  ALL revisions of that document.  ID plus REV refers to a particular document.

If you got this far gives yourself a big hug.  Now you should turn back to chapter four and work your way through the examples.   You can use cURL to play along with Chapter 4: The Core API in the Definitive Guide.  You must do these exercises and understand how HTTP Headers are used to modify the effects of the basic RESTful HTTP command set for CouchDB.   If it makes you feel even more manly you can use Fiddler in  place of cURL.  A Windows version of cURL is available here. [select download wizard, curl executable, Windows/Win32]. And Fiddler is available here.  We assume you are able to follow Chapter 4 on your own.  Note cURL makes use of an extensive set of command line switches.  These are used with little comment in Chapter 4 – you may want to have this MANPage availabe to decode the switches as you move through the chapter.

214-5

Posted 2011/06/07 by Cloud2013 in couchdb, REST, Web

Tagged with , , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: