Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
CouchRest.put throws an error
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Divya Varma  
View profile  
 More options Dec 17 2011, 12:15 am
From: Divya Varma <rdivyava...@gmail.com>
Date: Fri, 16 Dec 2011 21:15:09 -0800 (PST)
Local: Sat, Dec 17 2011 12:15 am
Subject: CouchRest.put throws an error
Hi,

I need to update a couchdb document, when I and run the following
command in ruby irb

      CouchRest.put('http://localhost:5984/db', {"_id": "1","_rev":
"sdf", "test": "testing"})

I get an error -

RestClient::Request::Unauthorized: 401 Unauthorized:
{"error":"unauthorized","reason":"You are not a server admin."}

While in the same console I am able to successfully run -

      CouchRest.post('http://localhost:5984/db', {"test": "testing"})

Could somebody help with this please.

Cheers!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ryan Graham  
View profile  
 More options May 22, 1:11 pm
From: Ryan Graham <r.m.gra...@gmail.com>
Date: Tue, 22 May 2012 10:11:47 -0700 (PDT)
Local: Tues, May 22 2012 1:11 pm
Subject: Re: CouchRest.put throws an error

In your example, you're creating a DB, which you need admin access for.

It looks like you're trying to create a document, which should be more like:
 CouchRest.put('http://localhost:5984/db/1', { "test": "testing"})

Notice the /1 at the end of the URL, which is the _id you specified in your
example.

~Ryan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »